chenrui há 4 anos atrás
pai
commit
8f8779bc2d

+ 48 - 0
src/api/receiving.js

@@ -0,0 +1,48 @@
+import { axios } from '@/utils/request'
+
+//  入库 列表  有分页
+export const receivingList = (params) => {
+  const url = `/receiving/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 列表  合计
+export const receivingCount = (params) => {
+  return axios({
+    url: '/receiving/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 入库
+export const receivingStockIn = (params) => {
+  return axios({
+    url: '/receiving/stockIn',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 入库审核
+export const receivingStockInAudit = (params) => {
+  return axios({
+    url: '/receiving/stockInAudit',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 详情  有分页
+export const receivingDetailList = (params) => {
+  const url = `/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

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

@@ -1284,7 +1284,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:sn/:type',
+                path: 'detail/:sn',
                 name: 'warehousingAuditDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/warehousingAudit/detail.vue'),
                 meta: {
@@ -1498,7 +1498,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id',
+                path: 'detail/:id/:sn',
                 name: 'companyCollectionPaymentDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyCollectionPayment/detail.vue'),
                 meta: {

+ 1 - 1
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -72,7 +72,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return settleUnitDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        return settleUnitDetailList(Object.assign(parameter, { unitSettleSn: 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++) {

+ 2 - 2
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -120,7 +120,7 @@ export default {
         { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '结算类型', dataIndex: 'settleTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '结算单号', scopedSlots: { customRender: 'unitSettleNo' }, width: 220, align: 'center' },
-        { title: '结算金额', dataIndex: 'settleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结算金额', dataIndex: 'realSettleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '结算时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作人', dataIndex: 'operateName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '结算方式', dataIndex: 'settleStyleName', width: 140, align: 'center', customRender: function (text) { return text || '--' } }
@@ -163,7 +163,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/companyCollectionPayment/detail/${row.id}` })
+      this.$router.push({ path: `/financialManagement/companyCollectionPayment/detail/${row.id}/${row.unitSettleSn}` })
     },
     // 合计
     getTotal (param) {

+ 14 - 41
src/views/financialManagement/warehousingAudit/detail.vue

@@ -56,7 +56,7 @@
 <script>
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
-import { stockPutBizInfo } from '@/api/stockPut'
+import { receivingDetailList } from '@/api/receiving'
 export default {
   components: { STable, VSelect },
   data () {
@@ -64,57 +64,30 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 160, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center' },
         { title: '采购数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'qtsy', width: 110, 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: 'productOrigUnit', width: 100, align: 'center' },
-        { title: '入库小计', dataIndex: 'warehousingSubtotal', width: 100, align: 'center' },
+        { title: '入库数量', dataIndex: 'putQty', width: 110, 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: 'dealerProductEntity.unit', width: 100, align: 'center' },
+        { title: '入库小计', dataIndex: 'totalAmount', width: 100, align: 'center' },
         { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '仓位', dataIndex: 'warehouseLocationName', 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
-        //     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 || '--'
-        //     data.list[i].productOrigUnit = productOrigUnit || '--'
-        //     data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
-        //     data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
-        //     // 入库小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-        //     data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
+        return receivingDetailList(Object.assign(parameter, { receivingBillSn: 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
+            // 入库小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].warehousingSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
       },
       basicInfoData: null, //  基本信息

+ 50 - 26
src/views/financialManagement/warehousingAudit/list.vue

@@ -6,12 +6,12 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="采购单号">
-              <a-input id="warehousingAuditList-putBizNo" v-model.trim="queryParam.putBizNo" allowClear placeholder="请输入采购单号"/>
+              <a-input id="warehousingAuditList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="采购入库单号">
-              <a-input id="warehousingAuditList-stockPutNo" v-model.trim="queryParam.stockPutNo" allowClear placeholder="请输入采购入库单号"/>
+              <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入采购入库单号"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -32,7 +32,7 @@
                   v-model="queryParam.auditState"
                   ref="auditState"
                   id="warehousingAuditList-auditState"
-                  code="PAYMENT_TYPE"
+                  code="RECEIVING_BILL_STATUS"
                   placeholder="请选择财务审核状态"
                   allowClear></v-select>
               </a-form-item>
@@ -66,14 +66,27 @@
       :scroll="{ x: 1420, y: tableHeight }"
       bordered>
       <!-- 采购入库单号 -->
-      <template slot="stockPutNo" slot-scope="text, record">
-        <span v-if="record.stockPutNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
+      <template slot="receivingBillNo" slot-scope="text, record">
+        <span v-if="record.receivingBillNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.receivingBillNo }}</span>
         <span v-else>--</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleExamine(record, 1)" id="warehousingAudit-adopt-btn">通过</a-button>
-        <a-button size="small" type="link" class="button-warning" @click="handleExamine(record, 2)" id="warehousingAudit-unadopt-btn">不通过</a-button>
+        <a-button
+          size="small"
+          v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
+          type="link"
+          class="button-info"
+          @click="handleExamine(record, 1)"
+          id="warehousingAudit-adopt-btn">通过</a-button>
+        <a-button
+          size="small"
+          v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
+          type="link"
+          class="button-warning"
+          @click="handleExamine(record, 2)"
+          id="warehousingAudit-unadopt-btn">不通过</a-button>
+        <span v-if="record.auditState!='WAIT_PUT_WAREHOUSE_AUDIT'">--</span>
       </template>
     </s-table>
   </a-card>
@@ -83,7 +96,7 @@
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import getDate from '@/libs/getDate'
-import { stockPutList } from '@/api/stockPut'
+import { receivingList, receivingStockInAudit, receivingCount } from '@/api/receiving'
 export default {
   components: { STable, VSelect },
   data () {
@@ -98,19 +111,19 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        putBizNo: '',
-        stockPutNo: '',
+        purchaseBillNo: '',
+        receivingBillNo: '',
         auditState: undefined
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '采购单号', dataIndex: 'putBizNo', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: 220, align: 'center' },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总数量', dataIndex: 'productTotalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库总成本', dataIndex: 'productTotalCost', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库时间', dataIndex: 'putTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购入库单号', scopedSlots: { customRender: 'receivingBillNo' }, width: 220, align: 'center' },
+        { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库总成本', dataIndex: 'totalPutAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'stockPutTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务审核状态', dataIndex: 'auditStateDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
@@ -129,7 +142,8 @@ export default {
           this.queryParam.beginDate = undefined
           this.queryParam.endDate = undefined
         }
-        return stockPutList(Object.assign(parameter, this.queryParam)).then(res => {
+        const params = Object.assign(parameter, this.queryParam)
+        return receivingList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -146,9 +160,19 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
+    // 合计
+    getTotal (param) {
+      receivingCount(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/warehousingAudit/detail/${row.putBizSn}/${row.putBizType}` })
+      this.$router.push({ path: `/financialManagement/warehousingAudit/detail/${row.receivingBillSn}` })
     },
     //  审核
     handleExamine (row, type) {
@@ -158,19 +182,19 @@ export default {
         content: '确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
         centered: true,
         onOk () {
-          // delectRolePower({ id: row.id }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          receivingStockInAudit({ id: row.id, auditState: type == 1 ? 'FINISH' : 'PUT_WAREHOUSE_AUDIT_REJECT' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
         }
       })
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.putBizNo = ''
-      this.queryParam.stockPutNo = ''
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.receivingBillNo = ''
       this.queryParam.auditState = undefined
       this.auditTime = []
       this.$refs.table.refresh(true)