lilei 3 years ago
parent
commit
9210f5406f

+ 113 - 6
src/views/salesManagement/outboundOrder/detailModal.vue

@@ -14,7 +14,66 @@
           <div>箭冠汽配西安大兴店,共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>1266.45</span> ,产品数量合计 <span>158</span>。</div>
         </div>
         <div class="toolsBar">
-          发货时间:<a-date-picker v-model="sendDate" :locale="locale"/>
+          <a-form-model
+            ref="ruleForm"
+            :model="form"
+            :rules="rules"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol"
+          >
+            <a-row>
+              <a-col span="12">
+                <a-form-model-item label="托运日期">
+                  <a-date-picker v-model="sendDate" :locale="locale"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="目的地">
+                  <a-input placeholder="请输入目的地"></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="收货人">
+                  <a-input placeholder="请输入收货人"></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="电话">
+                  <a-input placeholder="请输入电话"></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="付款方式">
+                  <v-select
+                    v-model="form.settleStyle"
+                    ref="settleStyle"
+                    code="SETTLE_STYLE"
+                    placeholder="请选择付款方式"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="交货方式">
+                  <v-select
+                    v-model="form.settleStyle"
+                    ref="settleStyle"
+                    code="SETTLE_STYLE"
+                    placeholder="请选择交货方式"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="详细地址">
+                  <a-textarea placeholder="请输入详细地址"></a-textarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="运费合计">
+                  <a-input disabled placeholder="请输入运费合计"></a-input>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model>
         </div>
         <div>
           <a-table :columns="columns" :pagination="false" :data-source="tableData" bordered>
@@ -26,6 +85,34 @@
             <template slot="qty" slot-scope="text, record">
               <a-input-number style="width: 100%;" v-model="record.qty" :min="1" :max="999999"></a-input-number>
             </template>
+            <!-- 体积 -->
+            <template slot="volume" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.volume" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 重量 -->
+            <template slot="weight" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.weight" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 计费单价 -->
+            <template slot="price" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.price" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 运费 -->
+            <template slot="freight" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.freight" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 保价 -->
+            <template slot="supportValue" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.supportValue" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 送货费 -->
+            <template slot="deliveryExpense" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.deliveryExpense" :min="1" :max="999999"></a-input-number>
+            </template>
+            <!-- 其他 -->
+            <template slot="other" slot-scope="text, record">
+              <a-input-number style="width: 100%;" v-model="record.other" :min="1" :max="999999"></a-input-number>
+            </template>
             <!-- 操作 -->
             <template slot="action" slot-scope="text, record, index">
               <a-button
@@ -86,14 +173,31 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
       spinning: false,
+      form: {
+      },
+      rules: {
+        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }]
+      },
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 15 }
+      },
       detail: [],
       sendDate: moment(),
       tableData: [],
       columns: [
-        { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '货物名称', dataIndex: 'goodName', scopedSlots: { customRender: 'goodName' }, width: '50%', align: 'center' },
-        { title: '件数', dataIndex: 'qty', scopedSlots: { customRender: 'qty' }, width: '25%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货物名称', dataIndex: 'goodName', scopedSlots: { customRender: 'goodName' }, width: '10%', align: 'center' },
+        { title: '件数', dataIndex: 'qty', scopedSlots: { customRender: 'qty' }, width: '8%', align: 'center' },
+        { title: '体积(m³)', dataIndex: 'volume', scopedSlots: { customRender: 'volume' }, width: '8%', align: 'center' },
+        { title: '重量(kg)', dataIndex: 'weight', scopedSlots: { customRender: 'weight' }, width: '8%', align: 'center' },
+        { title: '计费单价(元)', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '9%', align: 'center' },
+        { title: '运费(元)', dataIndex: 'freight', scopedSlots: { customRender: 'freight' }, width: '9%', align: 'center' },
+        { title: '保价(万)', dataIndex: 'supportValue', scopedSlots: { customRender: 'supportValue' }, width: '9%', align: 'center' },
+        { title: '送货费', dataIndex: 'deliveryExpense', scopedSlots: { customRender: 'deliveryExpense' }, width: '9%', align: 'center' },
+        { title: '其他', dataIndex: 'other', scopedSlots: { customRender: 'other' }, width: '8%', align: 'center' },
+        { title: '合计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
     }
   },
@@ -104,6 +208,9 @@ export default {
     // 删除
     handleDel (row, index) {
       this.tableData.splice(index, 1)
+      this.tableData.map((item, i) => {
+        item.no = i + 1
+      })
     },
     // 添加
     addItem () {
@@ -111,7 +218,7 @@ export default {
       this.tableData.push({
         no: len + 1,
         goodName: '',
-        qty: 1
+        qty: ''
       })
     },
     // 确定

+ 15 - 11
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -34,21 +34,23 @@
       <a-card size="small" :bordered="false" class="salesDetail-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions size="small" :column="2">
-              <a-descriptions-item label="备货单号">{{ detailData&&detailData.dispatchBillNo || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions size="small" :column="3">
               <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货人" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备货单号">{{ detailData&&detailData.dispatchBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="发货编号">{{ detailData&&detailData.dispatchBillNo || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货电话" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货地址" :span="2" v-if="detailData&&detailData.salesBillExtEntity">
                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}
                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCityName || '' }}
                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrCountyName || '' }}
                 {{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddr || '' }}
               </a-descriptions-item>
-              <a-descriptions-item label="收货电话" v-if="detailData&&detailData.salesBillExtEntity">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -89,7 +91,7 @@
       </a-card>
     </a-spin>
     <!-- 分类打印 -->
-    <choose-type-modal :openModal="openModal" :outBizSubSn="outBizSubSn" @ok="handleOk" @close="openModal=false" />
+    <sendTypeModal ref="typePrint" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <!-- 导出Excel -->
     <export-excel-modal :openModal="openExcelModal" :itemData="detailData" @ok="handleExcelOk" @close="openExcelModal=false" />
     <!-- 打印 -->
@@ -100,14 +102,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import chooseTypeModal from './chooseTypeModal.vue'
+import sendTypeModal from './sendTypeModal.vue'
 import exportExcelModal from './exportExcelModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { dispatchDetaillList, dispatchFindBySn, dispatchDetailPrint, dispatchDetailExcel } from '@/api/dispatch'
 export default {
   name: 'PushOrderDetail',
   mixins: [commonMixin],
-  components: { STable, VSelect, chooseTypeModal, exportExcelModal },
+  components: { STable, VSelect, sendTypeModal, exportExcelModal },
   props: {
     outBizSubSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -222,12 +224,14 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       this.nowPrintType = type
-      if (type == 'SALES_BILL' || type == 'DISPATCH_BILL') { //  销售打印/发货打印
+      if (type == 'DISPATCH_BILL') { // 发货打印
         this.requestFun()
-      } else if (type == 'SALES_BILL_TYPE' || type == 'DISPATCH_BILL_TYPE') { //  销售分类打印/发货分类打印
+      } else if (type == 'DISPATCH_BILL_TYPE') { // 发货分类打印
         this.openModal = true
+        this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.$route.params.sn)
       }
     },
+    // 打印
     requestFun (obj) {
       const _this = this
       const params = {

+ 26 - 7
src/views/salesManagement/pushOrderManagement/chooseTypeModal.vue → src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -4,7 +4,7 @@
     :footer="null"
     :maskClosable="false"
     class="pushOrderManagement-print-type-modal"
-    title="选择分类"
+    title="发货分类打印"
     v-model="isShow"
     @cancle="isShow=false"
     :width="600">
@@ -17,6 +17,21 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
+        <a-form-model-item label="销售单号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.salesBillNo || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="备货单号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.dispatchBillNo || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="发货编号" style="margin-bottom: 0;">
+          {{ detailData&&detailData.settleStyleSnDictValue || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="客户名称" style="margin-bottom: 0;">
+          {{ detailData&&detailData.buyerName || '--' }}
+        </a-form-model-item>
+        <a-form-model-item label="收货客户名称" style="margin-bottom: 0;">
+          {{ detailData&&detailData.buyerName || '--' }}
+        </a-form-model-item>
         <a-form-model-item label="产品分类" prop="id">
           <a-select id="pushOrderManagement-print-form" v-model="form.id" placeholder="请选择产品分类">
             <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
@@ -61,7 +76,8 @@ export default {
         wrapperCol: { span: 15 }
       },
       spinning: false,
-      typeList: []
+      typeList: [],
+      detailData: null
     }
   },
   methods: {
@@ -74,7 +90,8 @@ export default {
           if (item) {
             const obj = {
               productBrandSn: item.productBrandSn,
-              productTypeSn: item.productTypeSn
+              productTypeSn: item.productTypeSn,
+              dispatchBillSn: this.detailData.dispatchBillSn
             }
             _this.$emit('ok', obj)
           }
@@ -91,15 +108,19 @@ export default {
       this.$refs.ruleForm.resetFields()
     },
     // 获取该销售单产品二级分类
-    getTypeData () {
+    getTypeData (dispatchBillSn) {
       this.typeList = [{ id: 'all' }]
-      dispatchDetailType({ dispatchBillSn: this.outBizSubSn || this.$route.params.sn }).then(res => {
+      dispatchDetailType({ dispatchBillSn: dispatchBillSn }).then(res => {
         if (res.status == 200) {
           if (res.data && res.data.length > 0) {
             this.typeList = [...this.typeList, ...res.data]
           }
         }
       })
+    },
+    setData (data, dispatchBillSn) {
+      this.detailData = data
+      this.getTypeData(dispatchBillSn)
     }
   },
   watch: {
@@ -112,8 +133,6 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
-      } else {
-        this.getTypeData()
       }
     }
   }

+ 26 - 11
src/views/salesManagement/salesCollection/list.vue

@@ -20,12 +20,12 @@
                 <a-input id="salesCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="备货单号">
-                <a-input id="salesCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
-              </a-form-item>
-            </a-col>
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="备货单号">
+                  <a-input id="salesCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收货客户名称">
                   <a-input id="salesCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入收货客户名称"/>
@@ -157,9 +157,15 @@
             type="link"
             v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
             class="button-warning"
-            @click="handleAudit(record)"
+            @click="handleColle(record)"
             id="financialCollectionList-audit-btn">收款</a-button>
-          <span v-else>--</span>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
+            class="button-warning"
+            @click="handleVoucher(record)"
+            id="financialCollectionList-voucher-btn">凭证</a-button>
         </template>
       </s-table>
       <!-- 销售收款弹框 -->
@@ -184,8 +190,10 @@
           </div>
         </div>
       </commonModal>
-      <!-- 发货信息 -->
-      <detailModal ref="detailModal" modalTit="发货信息" :openModal="showDetail" @cancel="showDetail=false"></detailModal>
+      <!-- 关联收款单 -->
+      <detailModal ref="detailModal" modalTit="关联收款单" :openModal="showDetail" @cancel="showDetail=false"></detailModal>
+      <!-- 销售收款凭证 -->
+      <voucherModal ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="showVoucher=false"></voucherModal>
     </a-spin>
   </a-card>
 </template>
@@ -200,17 +208,19 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import commonModal from '@/views/common/commonModal.vue'
 import detailModal from './detailModal.vue'
+import voucherModal from './voucherModal.vue'
 import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
 
 export default {
   name: 'SalesCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate, commonModal, detailModal, Area },
+  components: { STable, VSelect, subarea, rangeDate, commonModal, detailModal, Area, voucherModal },
   data () {
     return {
       spinning: false,
       showDetail: false,
       showSkModal: false,
+      showVoucher: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
@@ -362,11 +372,16 @@ export default {
         })
       }
     },
+    // 凭证
+    handleVoucher (row) {
+      this.showVoucher = true
+    },
+    // 收款
     handleColle (row) {
       this.handlePlData = [row]
       this.showSkModal = true
     },
-    // 收款
+    // 批量收款
     handleSaveColle (row) {
       const _this = this
       // 关联收款

+ 180 - 0
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -0,0 +1,180 @@
+<template>
+  <a-modal
+    centered
+    class="collection-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancle="isShow=false"
+    width="80%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <div class="toolsBar">
+          <a-descriptions>
+            <a-descriptions-item label="销售单号">
+              XS220506000005
+            </a-descriptions-item>
+            <a-descriptions-item label="备货单号">
+              FH220605000004-1
+            </a-descriptions-item>
+            <a-descriptions-item label="发货编号">
+              3
+            </a-descriptions-item>
+            <a-descriptions-item label="客户名称">
+              箭冠汽配西安未央店
+            </a-descriptions-item>
+            <a-descriptions-item label="收货客户名称">
+              箭冠汽配西安未央店
+            </a-descriptions-item>
+            <a-descriptions-item label="收款方式">
+              未指定
+            </a-descriptions-item>
+            <a-descriptions-item label="产品款数">
+              15
+            </a-descriptions-item>
+            <a-descriptions-item label="产品数量">
+              6
+            </a-descriptions-item>
+            <a-descriptions-item label="总售价">
+              115
+            </a-descriptions-item>
+            <a-descriptions-item label="业务状态">
+              出库中
+            </a-descriptions-item>
+            <a-descriptions-item label="财务状态">
+              已完结
+            </a-descriptions-item>
+            <a-descriptions-item label="单据状态">
+              有效
+            </a-descriptions-item>
+            <a-descriptions-item label="收款类型">
+              关联收款单
+            </a-descriptions-item>
+            <a-descriptions-item label="收款时间">
+              2022-05-31 16:17:22
+            </a-descriptions-item>
+          </a-descriptions>
+        </div>
+        <div>
+          <a-table :columns="columns" :pagination="false" :data-source="tableData" bordered>
+            <!-- 收款单号 -->
+            <template slot="salesBillNo" slot-scope="text, record">
+              <span class="link-bule">{{ record.salesBillNo }}</span>
+            </template>
+          </a-table>
+        </div>
+      </div>
+      <div class="btn-box">
+        <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+export default {
+  name: 'VoucherModal',
+  components: { STable, VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    cancelText: { // 取消 按钮文字
+      type: String,
+      default: '关闭'
+    },
+    isCancel: { // 是否显示  取消 按钮
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      detail: [],
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
+        { title: '申请人', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '财务收款事由', dataIndex: 'buyerName1', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订单总金额', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
+        { title: '收款总金额', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '授信总金额', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余款抵扣总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      tableData: []
+    }
+  },
+  methods: {
+    setData (data) {
+      this.detail = data
+    },
+    // 删除
+    handleDel (row) {
+
+    },
+    // 选择
+    handleChoose (row) {
+
+    },
+    // 确定
+    handleCommonOk () {
+      this.$emit('ok')
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    },
+    // 重置
+    resetSearchForm () {
+
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('cancel')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .collection-detail-modal{
+    .common-main{
+       .toolsBar{
+         display: flex;
+         align-items: center;
+         margin-bottom: 10px;
+         .ant-btn{
+           margin-left: 30px;
+         }
+       }
+    }
+    .btn-box{
+      text-align: center;
+      margin-top: 30px;
+      .ant-btn{
+        margin:0 10px;
+      }
+    }
+  }
+</style>

+ 28 - 12
src/views/salesManagement/sendOutOrder/detailModal.vue

@@ -17,8 +17,15 @@
           <a-table :columns="outColumns" :pagination="false" :data-source="outTableData" bordered></a-table>
         </div>
         <div class="toolsBar forms">
-          <div>发货时间:2022-02-14</div>
-          <div>物流情况:
+          <div style="flex-basis:35%">托运日期:2022-02-14</div>
+          <div style="flex-basis:65%">目的地:广州广园</div>
+          <div style="flex-basis:35%">收货人:颜磊(18800005555)</div>
+          <div style="flex-basis:65%">详细地址:广州市白云区金钟横路机场东门08号高益大厦101号</div>
+          <div style="flex-basis:35%">收款方式:月结</div>
+          <div style="flex-basis:35%">交货方式:送货</div>
+          <div style="flex-basis:30%">运费合计:2125.00</div>
+          <div style="flex-basis:100%">发货备注:--</div>
+          <div style="flex-basis:35%">物流情况:
             <a-radio-group>
               <a-radio :value="1">
                 正常
@@ -28,9 +35,9 @@
               </a-radio>
             </a-radio-group>
           </div>
-          <div>是否收货:<div><a-checkbox>已收货</a-checkbox></div></div>
-          <div>收货时间:<a-date-picker format="YYYY-MM-DD" v-model="form.sendDate"/></div>
-          <div><label>备注:</label><a-input v-model="form.remark" placeholder="请输入备注"/></div>
+          <div style="flex-basis:35%">是否收货:<div><a-checkbox>已收货</a-checkbox></div></div>
+          <div style="flex-basis:30%">收货时间:<a-date-picker format="YYYY-MM-DD" v-model="form.sendDate"/></div>
+          <div style="flex-basis:100%"><label>物流备注:</label><a-textarea v-model="form.remark" placeholder="请输入备注"/></div>
         </div>
         <div>
           <a-table :columns="columns" :pagination="false" :data-source="tableData" bordered></a-table>
@@ -83,9 +90,17 @@ export default {
       },
       tableData: [],
       columns: [
-        { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '货物名称', dataIndex: 'goodName', width: '50%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '件数', dataIndex: 'qty', width: '25%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货物名称', dataIndex: 'goodName', scopedSlots: { customRender: 'goodName' }, width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '件数', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '体积(m³)', dataIndex: 'volume', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '重量(kg)', dataIndex: 'weight', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '计费单价(元)', dataIndex: 'price', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '运费(元)', dataIndex: 'freight', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '保价(万)', dataIndex: 'supportValue', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '送货费', dataIndex: 'deliveryExpense', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '其他', dataIndex: 'other', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计', dataIndex: 'totalAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       outTableData: [],
       outColumns: [
@@ -94,10 +109,11 @@ export default {
         { title: '业务单号', dataIndex: 'qty', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库类型', dataIndex: 'goodName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货编号', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货客户名称', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '产品数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收款时间', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
     }
   },
@@ -147,7 +163,7 @@ export default {
          display: flex;
          align-items: center;
          > label{
-           flex-basis: 50px;
+           flex-basis: 70px;
          }
        }
     }

+ 44 - 19
src/views/salesManagement/stockPrint/list.vue

@@ -126,21 +126,12 @@
             >发货分类打印</a-button>
           </template>
         </s-table>
-
-        <!-- 操作提示 -->
-        <commonModal modalTit="发货分类打印" :openModal="showTipModal" @cancel="showTipModal=false">
-          <div style="line-height: 30px;">
-            <div>销售单号:{{ tipData&&tipData.buyerName }}</div>
-            <div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
-            <div>发货编号:{{ tipData&&tipData.buyerName }}</div>
-            <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
-            <div>收货客户名称:{{ tipData&&tipData.buyerName }}</div>
-            <div>产品分类:{{ tipData&&tipData.buyerName }}</div>
-          </div>
-        </commonModal>
-
+        <!-- 分类打印 -->
+        <sendTypeModal ref="typePrint" :openModal="showTipModal" @ok="handlePrintOk" @close="showTipModal=false" />
         <!-- 打印记录 -->
         <recordModal modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
+        <!-- 打印 -->
+        <div id="print"></div>
       </a-spin>
     </a-card>
   </div>
@@ -155,13 +146,13 @@ import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
-import commonModal from '@/views/common/commonModal.vue'
+import sendTypeModal from '@/views/salesManagement/pushOrderManagement/sendTypeModal.vue'
 import recordModal from './recordModal.vue'
-import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
+import { dispatchlList, dispatchQueryCount, dispatchDetailPrint } from '@/api/dispatch'
 export default {
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, recordModal, Area },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, sendTypeModal, recordModal, Area },
   data () {
     return {
       spinning: false,
@@ -189,7 +180,6 @@ export default {
         totalRecord: 0
       },
       showTipModal: false,
-      tipData: null,
       showRecordModal: false,
       recordData: null,
       // 加载数据方法 必须为 Promise 对象
@@ -261,11 +251,46 @@ export default {
         this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
       }
     },
-    // 允许打印
+    // 发货分类打印
     handlePrint (row) {
-      this.tipData = row
+      this.$refs.typePrint.setData(row, row.dispatchBillSn)
       this.showTipModal = true
     },
+    // 打印
+    handlePrintOk (obj) {
+      const _this = this
+      const params = {
+        type: 'DISPATCH_BILL_TYPE',
+        dispatchBillSn: obj.dispatchBillSn
+      }
+      _this.spinning = true
+      dispatchDetailPrint(Object.assign(params, obj || {})).then(res => {
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res)
+        }
+      })
+    },
+    print (data) {
+      this.spinLoading = false
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printfpmd" name="printfpmd" src="' + url + '" hidden></iframe>'
+      window.frames['printfpmd'].focus()
+      window.frames['printfpmd'].print()
+    },
     // 打印记录
     viewPrint (row) {
       this.recordData = row