lilei hace 4 años
padre
commit
2eb00a0273

+ 1 - 1
.env.preview

@@ -1,6 +1,6 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=http://ocs-admin.360arrow.com.cn/ocs
+VUE_APP_API_BASE_URL=http://ocs-admin.360arrow.com.cn/ocs-admin
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=箭冠运营中心系统-pre
 VUE_APP_LOGO=@/assets/logo.png

+ 11 - 11
src/config/router.config.js

@@ -761,17 +761,6 @@ export const asyncRouterMap = [
                   // permission: 'M_outboundOrder_list'
                 }
               },
-              {
-                path: 'detail/:id',
-                name: 'examineVerifyDetail',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/detail.vue'),
-                meta: {
-                  title: '备货审核详情',
-                  icon: 'audit',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
-                }
-              }
             ]
           },
           {
@@ -796,6 +785,17 @@ export const asyncRouterMap = [
                   hidden: true
                   // permission: 'M_outboundList'
                 }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'pushOrderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/pushOrderManagement/detail.vue'),
+                meta: {
+                  title: '下推订单详细',
+                  icon: 'export',
+                  hidden: true
+                  // permission: 'M_outboundList'
+                }
               }
             ]
           },

+ 0 - 182
src/views/salesManagement/examineVerify/detail.vue

@@ -1,182 +0,0 @@
-<template>
-  <div class="examineVerifyDetail-page-wrapper">
-    <!-- 操作 -->
-    <a-page-header :ghost="false" @back="handleBack" class="examineVerifyDetail-operation-wrapper">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="examineVerifyDetail-btn-back" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-button key="2" @click="handlePreview" id="examineVerifyDetail-btn-preview">打印预览</a-button>
-        <a-button key="1" type="primary" @click="handlePrint" id="examineVerifyDetail-btn-print">快速打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 急件单信息 -->
-    <a-card size="small" :bordered="false" class="examineVerifyDetail-info-wrapper">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <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="联系手机">名称思密达</a-descriptions-item>
-            <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
-            <a-descriptions-item label="备注" span="2">名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达</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="完结状态">名称思密达</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 表格 -->
-    <a-card size="small" :bordered="false" class="examineVerifyDetail-table-wrapper">
-      <!-- 合计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">
-          总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。<br/>
-          总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。
-        </div>
-      </a-alert>
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1660 }"
-        bordered>
-        <!-- 库存数量 -->
-        <template slot="inventoryQuantity" slot-scope="text, record">
-          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{ record.inventoryQuantity }}</span>
-        </template>
-      </s-table>
-    </a-card>
-  </div>
-
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
-        { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
-        { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  返回
-    handleBack () {
-      this.$router.push({ path: '/salesManagement/examineVerify/list' })
-    },
-    //  冲减
-    handleSubmit () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定要进行冲减吗?',
-        okText: '确定',
-        cancelText: '取消',
-        centered: true,
-        onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    },
-    //  快速打印
-    handlePrint () {
-
-    },
-    //  打印预览
-    handlePreview () {
-
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .examineVerifyDetail-page-wrapper{
-    .examineVerifyDetail-info-wrapper{
-      margin: 15px 0;
-      .item-cont {
-        margin-bottom: 15px;
-        display: flex;
-        .item-label {
-          width: 115px;
-          font-size: 14px;
-          color: rgba(0, 0, 0, 0.85);
-          flex-shrink: 0;
-        }
-        .item-main {
-          flex-grow: 1;
-          word-break: break-all;
-        }
-      }
-    }
-    .examineVerifyDetail-table-wrapper{
-      .red{
-        color: #ed1c24;
-      }
-    }
-  }
-</style>

+ 99 - 103
src/views/salesManagement/examineVerify/list.vue

@@ -8,9 +8,9 @@
             <a-form-item label="创建时间">
               <a-range-picker
                 style="width:100%"
-                id="examineVerifyList-bundleNamesss"
+                id="examineVerifyList-creatDate"
                 :disabledDate="disabledDate"
-                v-model="queryParam.brand"
+                v-model="time"
                 :format="dateFormat"
                 :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
@@ -29,10 +29,10 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="打印状态">
               <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="examineVerifyList-billStatus"
-                code="PAYMENT_TYPE"
+                v-model="queryParam.printStatus"
+                ref="printStatus"
+                id="examineVerifyList-printStatus"
+                code="PRINT_STATUS"
                 placeholder="请选择打印状态"
                 allowClear></v-select>
             </a-form-item>
@@ -44,7 +44,7 @@
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   id="examineVerifyList-billStatus"
-                  code="PAYMENT_TYPE"
+                  code="DISPATCH_BILL_STATUS"
                   placeholder="请选择单据状态"
                   allowClear></v-select>
               </a-form-item>
@@ -61,109 +61,114 @@
         </a-row>
       </a-form>
     </div>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">
+        总售价::<strong>{{ totalData.totalAmount }}</strong>元;
+        总单数:<strong>{{ totalData.totalRecord }}</strong>;
+        总款数::<strong>{{ totalData.totalCategory }}</strong>;
+        总数量::<strong>{{ totalData.totalQty }}</strong>;
+      </div>
+    </a-alert>
     <!-- 列表 -->
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="examineVerifyList-export" :disabled="!hasSelected" :loading="loading" @click="handleBatchAudit">
-        批量审核
-      </a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">
-          {{ `已选 ${selectedRowKeys.length} 项` }}
-        </template>
-      </span>
-    </div>
     <s-table
       class="sTable"
       ref="table"
       size="default"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
       :showPagination="false"
-      :scroll="{ x: 1680 }"
+      :scroll="{ x: 1680, y:tableHeight }"
       bordered>
-      <!-- 状态 -->
-      <template slot="status" slot-scope="text, record">
-        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
+      <!-- 下推单号 -->
+      <template slot="dispatchBillNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleExamine(record)" id="examineVerifyList-examine-btn">备货审核</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="examineVerifyList-detail-btn">详情</a-button>
+        <a-button
+          size="small"
+          type="link"
+          class="button-info"
+          v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'"
+          @click="handleExamine(record)"
+          id="examineVerifyList-examine-btn">备货审核</a-button>
+        <span v-else>--</span>
       </template>
     </s-table>
   </a-card>
 </template>
 
 <script>
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { dispatchlList, dispatchQueryCount, dispatchStockUpAduit } from '@/api/dispatch'
 import custList from '@/views/common/custList.js'
 import { STable, VSelect } from '@/components'
+import moment from 'moment'
 export default {
   components: { STable, VSelect, custList },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      time: [],
       queryParam: { //  查询条件
-        bundleName: '', //  品牌名称
-        state: undefined //  状态
+        buyerName: undefined, //  客户名称
+        salesBillNo: '', //  销售单号
+        printStatus: undefined, //  打印状态
+        billStatus: undefined //  业务状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '单据来源', dataIndex: 'creasteDate', width: 100, align: 'center' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '单据来源', dataIndex: 'salesBillSourceDictValue', width: 100, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 230, align: 'center' },
+        { title: '下推单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: 230, align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货时间', dataIndex: 'audsitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', scopedSlots: { customRender: 'status' }, width: 110, align: 'center' },
-        { title: '打印状态', dataIndex: 'audsitsTime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印次数', dataIndex: 'audsitTsime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '备货时间', dataIndex: 'stockUpDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' },
+        { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: 100, align: 'center', customRender: function (text) { return text || '0' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
+      totalData: {
+        totalAmount: 0,
+        totalQty: 0,
+        totalRecord: 0
+      },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 440
+        }
+        // 创建时间
+        if (this.time && this.time.length > 0) {
+          this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        // 查询总计
+        dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
+          this.totalData = Object.assign(this.totalData, res.data || {})
+        })
+        return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
-      },
-      custData: [] //  客户 下拉数据
-    }
-  },
-  computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
+      }
     }
   },
   methods: {
@@ -171,59 +176,50 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  重置
     resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.buyerName = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.billStatus = undefined
+      this.queryParam.printStatus = undefined
+      this.time = []
       this.$refs.table.refresh(true)
     },
-    //  批量审核
-    handleExamine () {
+    //  审核
+    handleExamine (row) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '确认要审核通过吗?',
-        okText: '确定',
-        cancelText: '取消',
+        content: '请点击下方按钮确认操作?',
         centered: true,
+        closable: true,
+        okText: '审核通过',
+        cancelText: '审核不通过',
         onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          _this.auditOrder(row.dispatchBillSn, 'OUTING_WAREHOUSE')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.auditOrder(row.dispatchBillSn, 'STOCK_UP_REJECT')
+          }
+          _this.$destroyAll()
+        }
+      })
+    },
+    auditOrder (dispatchBillSn, billStatus) {
+      dispatchStockUpAduit({
+        dispatchBillSn,
+        billStatus
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
         }
       })
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/examineVerify/detail/${row.id}` })
-    },
-    // 批量审核
-    handleBatchAudit () {
-      this.loading = true
-      // ajax request after empty completing
-      setTimeout(() => {
-        this.loading = false
-        this.selectedRowKeys = []
-      }, 1000)
-    },
-    onSelectChange (selectedRowKeys) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys)
-      this.selectedRowKeys = selectedRowKeys
+      this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn } })
     }
   }
 }

+ 134 - 0
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -0,0 +1,134 @@
+<template>
+  <div class="salesDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
+      <template slot="subTitle">
+        <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+      </template>
+      <template slot="extra">
+        <a-button key="4" type="primary" id="salesDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="salesDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions size="small" :column="3" v-if="detailData">
+            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货地址">{{ detailData.salesBillExtEntity.shippingAddrProvinceName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCityName || '--' }}{{ detailData.salesBillExtEntity.shippingAddrCountyName || '--' }}{{ detailData.salesBillExtEntity.shippingAddr || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货人">{{ detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货电话">{{ detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ detailData.remarks || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData.auditDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="pages-wrap">
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
+        <div slot="message">
+          总销售数量:<strong>{{ detailData.totalQty || 0 }}</strong>;已取消数量:<strong>{{ detailData.totalCancelQty || 0 }}</strong>;已下推数量:<strong>{{ detailData.totalPushedQty || 0 }}</strong>;待下推数量:<strong>{{ detailData.totalUnpushedQty || 0 }}</strong>;已发货数量:<strong>{{ detailData.totalDispatchQty || 0 }}</strong>;待发货数量:<strong>{{ detailData.totalUndispatchQty || 0 }}</strong>;<br/>
+          总售价:<strong>{{ detailData.totalAmount || 0 }}</strong>;总成本:<strong>{{ detailData.totalCost || 0 }}</strong>;总毛利:<strong>{{ detailData.grossProfit || 0 }}</strong>;已取消金额:<strong>{{ detailData.totalCancelAmount || 0 }}</strong>;已下推金额:<strong>{{ detailData.totalPushedAmount || 0 }}</strong>;待下推金额:<strong>{{ detailData.totalUnpushedAmount || 0 }};已发货金额:<strong>{{ detailData.totalDispatchAmount || 0 }};待发货金额:<strong>{{ detailData.totalUndispatchAmount || 0 }}</strong>;
+          </strong></strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: 500 }"
+        bordered>
+        <!-- 产品编码 -->
+        <template slot="productCode" slot-scope="text, record">
+          <a-badge count="促" v-if="record.promotionFlag == 1">
+            <div style="padding-right: 15px;">{{ text }}</div>
+          </a-badge>
+          <span v-else>{{ text }}</span>
+        </template>
+      </s-table>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { dispatchDetaillList, dispatchFindBySn } from '@/api/dispatch'
+export default {
+  name: 'SalesDetail',
+  components: { STable, VSelect },
+  data () {
+    return {
+      disabled: false,
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, scopedSlots: { customRender: 'productCode' }, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售数量', dataIndex: 'salesQty', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '本次下推数', dataIndex: 'qty', width: 200, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return dispatchDetaillList(Object.assign(parameter, { dispatchBillSn: this.$route.params.sn })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
+            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
+            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+            const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
+            data.list[i].productCode = productCode || '--'
+            data.list[i].productName = productName || '--'
+            data.list[i].productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
+            data.list[i].productOrigUnit = productOrigUnit || '--'
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      detailData: null //  详情数据
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.back()
+    },
+    //  详情
+    getDetail () {
+      dispatchFindBySn({ dispatchBillSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    }
+  },
+  mounted () {
+    this.getDetail()
+  }
+}
+</script>
+
+<style lang="less">
+  .salesDetail-wrap{
+    .salesDetail-cont{
+      margin-bottom: 15px;
+    }
+    .footer-cont{
+      margin-top: 5px;
+      text-align: center;
+    }
+  }
+</style>

+ 3 - 4
src/views/salesManagement/pushOrderManagement/list.vue

@@ -37,7 +37,7 @@
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   id="pushOrder-billStatus"
-                  code="SALES_BILL_STATUS"
+                  code="DISPATCH_BILL_STATUS"
                   placeholder="请选择业务状态"
                   allowClear></v-select>
               </a-form-item>
@@ -126,8 +126,7 @@ export default {
         { title: '下推金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '备货时间', dataIndex: 'stockUpDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库时间', dataIndex: 'settleDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 220, align: 'center', fixed: 'right' }
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -167,7 +166,7 @@ export default {
     },
     // 详情
     handleDetail (row, type) {
-      this.$router.push({ name: type == 0 ? 'salesDetail' : 'pushOrderDetail', params: { sn: row.salesBillSn } })
+      this.$router.push({ name: type == 0 ? 'salesDetail' : 'pushOrderDetail', params: { sn: type == 0 ? row.salesBillSn : row.dispatchBillSn } })
     },
     // 重置
     resetSearchForm () {

+ 1 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -30,7 +30,7 @@
               <a-form-item label="打印状态">
                 <v-select
                   v-model="queryParam.printStatus"
-                  ref="billStatus"
+                  ref="printStatus"
                   id="salesManagementList-printStatus"
                   code="PRINT_STATUS"
                   placeholder="请选择打印状态"

+ 4 - 3
src/views/salesManagement/salesQuery/queryPart.vue

@@ -65,7 +65,7 @@
             size="small"
             v-model="record.salesNums"
             :precision="0"
-            :min="0"
+            :min="1"
             :max="999999"
             placeholder="请输入" />
         </div>
@@ -85,6 +85,7 @@
           class="button-info"
           :loading="newLoading"
           @click="handleAdd(record)"
+          :disabled="!record.productPrice || record.productPrice<=0"
           id="productInfoList-edit-btn">添加</a-button>
       </template>
     </s-table>
@@ -147,8 +148,8 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].salesNums = 1
             data.list[i].currentStockQty = data.list[i].currentStockQty || 0
-            data.list[i].productPackQty = 1
-            data.list[i].lastStockCost = 1
+            // data.list[i].productPackQty = 1
+            // data.list[i].lastStockCost = 1
           }
           this.disabled = false
           return data

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.104:8602/ocs',
-        // target: 'http://ocs-admin.360arrow.com.cn/ocs',
+        target: 'http://192.168.16.104:8602/ocs-admin',
+        // target: 'http://ocs-admin.360arrow.com.cn/ocs-admin',
         ws: false,
         changeOrigin: true,
         pathRewrite: {