浏览代码

bug 修复

lilei 4 年之前
父节点
当前提交
37d9803064

+ 1 - 1
src/api/purchase.js

@@ -31,7 +31,7 @@ export const purchaseDetailBySn = (params) => {
 //  采购明细 统计
 export const purchaseCount = (params) => {
   return axios({
-    url: `/purchase/count`,
+    url: `/purchase/queryCount`,
     data: params,
     method: 'post'
   })

+ 9 - 0
src/api/purchaseDetail.js

@@ -34,3 +34,12 @@ export const purchaseDetailDelAll = (params) => {
     method: 'post'
   })
 }
+
+//  采购明细 统计
+export const purchaseDetailCount = (params) => {
+  return axios({
+    url: `/purchaseDetail/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}

+ 1 - 1
src/api/sales.js

@@ -119,7 +119,7 @@ export const salesDel = (params) => {
 // 销售 统计
 export const salesCount = (params) => {
   return axios({
-    url: `/sales/count`,
+    url: `/sales/queryCount`,
     data: params,
     method: 'post'
   })

+ 22 - 11
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -27,7 +27,7 @@
               id="purchaseOrderEdit-edit-circle-btn"
               @click.stop="handleEditInfo" />
           </template>
-          <a-descriptions :column="3">
+          <a-descriptions :column="2">
             <a-descriptions-item label="供应商">{{ detail&&detail.dealerName }}</a-descriptions-item>
             <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleEntity.name }}</a-descriptions-item>
             <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}({{ detail&&detail.consigneeTel }})</a-descriptions-item>
@@ -97,6 +97,7 @@
               :columns="columns"
               :data="loadData"
               :scroll="{ x: 1370, y:300 }"
+              :defaultLoadData="false"
               bordered>
               <!-- 采购数量 -->
               <template slot="storageQuantity" slot-scope="text, record">
@@ -128,9 +129,9 @@
           <div>
             <!-- 总计 -->
             <a-alert type="info" showIcon style="margin-bottom:15px">
-              <div slot="message">产品款数 <strong>{{ detail&&detail.totalCategory }}</strong> ,
-                采购数量合计 <strong>{{ detail&&detail.totalQty }}</strong> ,
-                采购金额合计¥<strong>{{ detail&&detail.totalAmount }}</strong></div>
+              <div slot="message">产品款数 <strong>{{ orderCountData&&orderCountData.totalCategory }}</strong> ,
+                采购数量合计 <strong>{{ orderCountData&&orderCountData.totalQty }}</strong> ,
+                采购金额合计¥<strong>{{ orderCountData&&orderCountData.totalAmount }}</strong></div>
             </a-alert>
             <!-- 列表 -->
             <s-table
@@ -190,7 +191,7 @@ import basicInfoModal from './basicInfoModal.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { purchaseDetailBySn, purchaseWriteSubmit } from '@/api/purchase'
-import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel } from '@/api/purchaseDetail'
+import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount } from '@/api/purchaseDetail'
 import { productList } from '@/api/product'
 export default {
   components: { STable, VSelect, basicInfoModal, ProductType, ProductBrand },
@@ -239,6 +240,7 @@ export default {
         })
       },
       // -------已选产品-------------
+      orderCountData: null,
       delLoading: false,
       // 表头
       chooseColumns: [
@@ -254,7 +256,10 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.disabled = true
-        return purchaseDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        // 查询总计
+        const params = Object.assign(parameter, { purchaseBillSn: this.$route.params.sn })
+        this.getCountQuery(params)
+        return purchaseDetailList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -267,18 +272,24 @@ export default {
     }
   },
   methods: {
+    // 获取采购单明细统计
+    getCountQuery (params) {
+      purchaseDetailCount(params).then(res => {
+        this.orderCountData = res.data || null
+      })
+    },
     // 获取采购单基本信息
     getOrderDetail () {
       purchaseDetailBySn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detail = res.data
         }
-        this.$message.info(res.message)
       })
     },
     //  基本信息编辑成功
     handleOk (data) {
-      // this.getOrderDetail()
+      this.openModal = false
+      this.getOrderDetail()
     },
     //  编辑基本信息
     handleEditInfo () {
@@ -396,12 +407,12 @@ export default {
 <style lang="less">
   .purchaseOrderEdit-wrap{
     .billno{
-      margin: 0 0 0 60px;
-      font-size: 20px;
+      margin: 0 0 0 30px;
+      font-size: 18px;
       font-weight: 600;
       display: inline-block;
       vertical-align: top;
-      color: rgba(0, 0, 0, 0.85);
+      color: #666;
     }
     .purchaseOrderEdit-cont{
       margin-bottom: 15px;

+ 14 - 12
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -148,12 +148,12 @@ export default {
       time: [], //  创建时间
       // 查询参数
       queryParam: {
-        // purchaseBillNo: '',
-        // supplierSn: '',
-        // billStatus: '',
-        // financialStatus: '',
-        // beginDate: '',
-        // endDate: ''
+        purchaseBillNo: '',
+        supplierSn: '',
+        billStatus: undefined,
+        financialStatus: undefined,
+        beginDate: '',
+        endDate: ''
       },
       totalData: {
         totalRecord: 0,
@@ -169,7 +169,7 @@ export default {
         { title: '供应商', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' } },
         { 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: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购金额(¥)', dataIndex: 'totalAmount', width: 115, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' },
         { title: '财务状态', dataIndex: 'financialStatus', scopedSlots: { customRender: 'financialStatus' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 350, align: 'center', fixed: 'right' }
@@ -251,11 +251,13 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.supplierSn = ''
+      this.queryParam.billStatus = undefined
+      this.queryParam.financialStatus = undefined
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.time = []
       this.$refs.table.refresh(true)
     },
     filterOption (input, option) {

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

@@ -266,7 +266,7 @@ export default {
         okText: '审核通过',
         cancelText: '审核不通过',
         onOk () {
-          _this.auditOrder(row.id, 'WAIT_OUT_STOCK')
+          _this.auditOrder(row.id, 'WAIT_OUT_WAREHOUSE')
         },
         onCancel (e) {
           if (!e.triggerCancel) {