chenrui vor 4 Jahren
Ursprung
Commit
04644a87d1

+ 8 - 0
src/api/sparePartsPur.js

@@ -11,6 +11,14 @@ export const sparePartsPurList = (params) => {
     method: 'post'
   })
 }
+//  散件采购(入库) 列表 合计
+export const sparePartsPurCount = (params) => {
+  return axios({
+    url: '/sparePartsPur/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
 //  散件采购(入库)详情列表  分页
 export const sparePartsPurDetailList = (params) => {
   const url = `/sparePartsPur/queryDetailPage/${params.pageNo}/${params.pageSize}`

+ 62 - 42
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -30,25 +30,27 @@
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单据状态">
+              <a-form-item label="业务状态">
                 <v-select
                   v-model="queryParam.state"
                   ref="state"
                   id="bulkWarehousingOrderList-state"
                   code="PAYMENT_TYPE"
-                  placeholder="请选择单据状态"
-                  allowClear></v-select>
+                  placeholder="请选择业务状态"
+                  allowClear
+                ></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="结算状态">
+              <a-form-item label="财务状态">
                 <v-select
                   v-model="queryParam.settleState"
                   ref="settleState"
                   id="bulkWarehousingOrderList-settleState"
-                  code="PAYMENT_TYPE"
-                  placeholder="请选择结算状态"
-                  allowClear></v-select>
+                  code="FINANCIAL_STATUS"
+                  placeholder="请选择财务状态"
+                  allowClear
+                ></v-select>
               </a-form-item>
             </a-col>
           </template>
@@ -79,7 +81,7 @@
     </div>
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>6</strong> 条记录,总数量合计 <strong>14</strong> ,总金额合计¥<strong>14.00</strong> </div>
+      <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -89,25 +91,18 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1320, y: 300 }"
+      :scroll="{ x: 1410, y: 300 }"
       bordered>
       <!-- 散件单号 -->
       <template slot="sparePartsPurchaseNo" slot-scope="text, record">
         <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
       </template>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
-      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleEdit(record)" id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="bulkWarehousingOrderList-detail-btn">详情</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleWarehouse(record)" id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDel(record)" id="bulkWarehousingOrderList-del-btn">删除</a-button>
+        <a-button size="small" type="primary" @click="handleEdit(record)" class="button-info" id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+        <a-button size="small" type="primary" @click="handleDetail(record)" class="button-success" id="bulkWarehousingOrderList-detail-btn">详情</a-button>
+        <a-button size="small" type="primary" @click="handleWarehouse(record)" class="button-warning" id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
+        <a-button size="small" type="primary" @click="handleDel(record)" class="button-error" id="bulkWarehousingOrderList-del-btn">删除</a-button>
       </template>
     </s-table>
     <!-- 选择基本信息弹框 -->
@@ -119,7 +114,8 @@
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
-import { sparePartsPurList } from '@/api/sparePartsPur'
+import { sparePartsPurList, sparePartsPurCount } from '@/api/sparePartsPur'
+import { supplierAllList } from '@/api/supplier'
 export default {
   components: { STable, VSelect, basicInfoModal },
   data () {
@@ -140,20 +136,19 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '散件单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: 200, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '供应商', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
-        { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 220, align: 'center', fixed: 'right' }
+        { title: '供应商', dataIndex: 'supplierName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总金额', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 110, align: 'center' },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 110, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 250, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        this.queryParam = {}
         return sparePartsPurList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -161,12 +156,33 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.dataTotalCount = data.count
+          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
-      }
+      },
+      productTotal: { // 合计信息
+        productTotalCost: '',
+        productTotalQty: ''
+      },
+      dataTotalCount: '' //  列表数据总条数
     }
   },
   methods: {
+    // 合计
+    getTotal (param) {
+    	sparePartsPurCount(param).then(res => {
+    		if (res.status == 200 && res.data) {
+    			this.productTotal = res.data
+    		} else {
+    			this.productTotal = {
+    				// 合计信息
+    				productTotalCost: '',
+    				productTotalQty: ''
+    			}
+    		}
+    	})
+    },
     //  新增
     handleAdd () {
       this.openModal = true
@@ -241,18 +257,11 @@ export default {
     //  导出
     handleExport () {
       const params = this.queryParam
-      if (this.creatDate && this.creatDate.length > 0) {
-        params.beginDate = moment(this.creatDate[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.creatDate[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
       this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
+      // customerBundleExportDelay(params).then(res => {
+      //   this.exportLoading = false
+      //   this.download(res)
+      // })
     },
     download (data) {
       if (!data) { return }
@@ -265,11 +274,22 @@ export default {
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()
+    },
+    // 供应商下拉数据
+    getSupplierList () {
+      supplierAllList().then(res => {
+        if (res.status == 200) {
+          this.supplierList = res.data
+        } else {
+          this.supplierList = []
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.openModal = false
+      vm.getSupplierList()
     })
   }
 }

+ 7 - 3
src/views/customerManagement/customerInfo/list.vue

@@ -106,7 +106,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1100, y: 300 }"
+      :scroll="{ x: 1190, y: 300 }"
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -171,7 +171,7 @@ export default {
         { title: '联系电话', dataIndex: 'contactTel', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 220, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -217,6 +217,10 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.clearData()
+      this.$refs.table.refresh(true)
+    },
+    clearData () {
       this.queryParam.customerName = undefined
       this.queryParam.contactName = ''
       this.queryParam.provinceSn = undefined
@@ -226,7 +230,6 @@ export default {
       this.queryParam.customerTypeSn = undefined
       this.creatTime = []
       this.lastSaleTime = []
-      this.$refs.table.refresh(true)
     },
     //  新增/编辑
     handleEdit (row) {
@@ -247,6 +250,7 @@ export default {
           custDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
+              _this.clearData()
               _this.$refs.table.refresh()
             }
           })

+ 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.217:8503/qpls-md',
-        target: 'http://qpls-md.360arrow.com.cn/qpls-md',
+        target: 'http://192.168.16.102:8503/qpls-md',
+        // target: 'http://qpls-md.360arrow.com.cn/qpls-md',
         // target: 'http://380d150d.nat123.fun:38226/qpls-md',
         ws: false,
         changeOrigin: true,