lilei 2 éve
szülő
commit
e0eac355eb

+ 10 - 0
src/api/sendBill.js

@@ -34,6 +34,16 @@ export const sendBillQueryPageList = (params) => {
     method: 'post'
   })
 }
+// 导出
+export const sendBillExcel = (params) => {
+  const url = `/sendBill/excel`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 // 更新发货单物流信息
 export const updateTransportInfo = params => {
   return axios({

+ 17 - 0
src/components/index.less

@@ -294,6 +294,23 @@
     color: #fff!important;
     -webkit-text-fill-color: #fff!important;
   }
+  .ant-table-row{
+    td{
+      > div:empty::after{
+        content: '--';
+      }
+    }
+  }
+  .ant-table-small > .ant-table-content .ant-table-body,.ant-table-fixed-right{
+    margin: 0;
+    tr:hover{
+      td{
+        > div:empty::after{
+          content: '--';
+        }
+      }
+    }
+  }
 }
 .sTable.fixPagination{
   >.ant-table-wrapper{

+ 61 - 64
src/views/salesManagement/salesQuery/list.vue

@@ -27,7 +27,7 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="打印状态">
+                <a-form-item label="备货打印状态">
                   <v-select
                     v-model="queryParam.printStatus"
                     ref="printStatus"
@@ -156,69 +156,66 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
-            @click="handleDetail(record)"
-          >审核</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            v-if="record.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')"
-            @click="handleDispatch(record)"
-          >下推</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesEdit')"
-            @click="handleEdit(record)"
-          >
-            编辑
-          </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesEdit')"
-            @click="handleEdit(record)"
-          >
-            改单
-          </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesDel')"
-            @click="handleDel(record)"
-          >
-            删除
-          </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesDel')"
-            @click="handleDel(record)"
-          >
-            取消
-          </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            :loading="!!tipData"
-            v-if="record.printStatus=='UNABLE_PRINT'"
-            @click="handlePrint(record)"
-          >允许备货打印</a-button>
-          <span
-            v-if="!(record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')) &&
-              !(record.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')) &&
-              !(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE')&&($hasPermissions('B_salesEdit') || $hasPermissions('B_salesDel'))) &&
-              !(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && ($hasPermissions('B_salesEdit') || $hasPermissions('B_salesDel')))">--</span>
+          <div>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
+              @click="handleDetail(record)"
+            >审核</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              v-if="record.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')"
+              @click="handleDispatch(record)"
+            >下推</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesEdit')"
+              @click="handleEdit(record)"
+            >
+              编辑
+            </a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesEdit')"
+              @click="handleEdit(record)"
+            >
+              改单
+            </a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesDel')"
+              @click="handleDel(record)"
+            >
+              删除
+            </a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesDel')"
+              @click="handleDel(record)"
+            >
+              取消
+            </a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              :loading="!!tipData"
+              v-if="record.printStatus=='UNABLE_PRINT'"
+              @click="handlePrint(record)"
+            >允许备货打印</a-button>
+          </div>
         </template>
       </s-table>
     </a-spin>

+ 28 - 6
src/views/salesManagement/sendOutOrder/list.vue

@@ -71,6 +71,14 @@
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="sendOut-export">导出</a-button>
                 <a @click="advanced=!advanced" style="margin-left: 8px">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -127,12 +135,13 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import rangeDate from '@/views/common/rangeDate.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { STable, VSelect } from '@/components'
 import detailModal from './detailModal.vue'
 import sendGoodModal from '../outboundOrder/sendGoodModal.vue'
 import Area from '@/views/common/area.js'
 import subarea from '@/views/common/subarea.js'
-import { sendBillQueryPageList } from '@/api/sendBill'
+import { sendBillQueryPageList, sendBillExcel } from '@/api/sendBill'
 export default {
   name: 'SendOutOrderList',
   mixins: [commonMixin],
@@ -140,6 +149,7 @@ export default {
   data () {
     return {
       spinning: false,
+      exportLoading: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
@@ -193,12 +203,12 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货单号', scopedSlots: { customRender: 'sendBillNo' }, width: '12%', align: 'center' },
         { title: '所在区域', dataIndex: 'subareaNameSet', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '地区', dataIndex: 'provinceName ', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'customeName', width: '14%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '地区', dataIndex: 'provinceName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'customeName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '托运日期', dataIndex: 'sendDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货人', dataIndex: 'customerCacateName', width: '14%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '物流电话', dataIndex: 'transportTele', width: '14%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '物流单号', dataIndex: 'transportNo', width: '14%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '收货人', dataIndex: 'customerCacateName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '物流电话', dataIndex: 'transportTele', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '物流单号', dataIndex: 'transportNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总件数', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '运费合计', dataIndex: 'totalSendAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收货状态', dataIndex: 'receiveFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -236,6 +246,16 @@ export default {
       this.showTipModal = false
       this.$refs.table.refresh()
     },
+    //  导出
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(sendBillExcel, _this.queryParam, '发货单列表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
     // 重置
     resetSearchForm () {
       this.time = []
@@ -251,6 +271,8 @@ export default {
       this.queryParam.bizNos = ''
       this.queryParam.transportState = undefined
       this.queryParam.receiveFlag = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.provinceSn = undefined
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.183:8602/ocs-admin',
+        target: 'http://192.168.0.102:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
         // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,