chenrui 3 年之前
父節點
當前提交
6abe04ec9e

+ 22 - 0
src/api/settleReceipt.js

@@ -0,0 +1,22 @@
+import { axios } from '@/utils/request'
+
+//  财务收款  列表  分页
+export const settleReceiptList = (params) => {
+  const url = `/settleReceipt/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  财务收款  收款
+export const settleReceipt = (params) => {
+  const url = `/settleReceipt/receipt/${params.sn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}

+ 3 - 3
src/views/financialManagement/financialCollection/list.vue

@@ -148,7 +148,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
-import { salesReceiptList, salesReceipt } from '@/api/sales'
+import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
 export default {
   components: { STable, VSelect, subarea, rangeDate },
   data () {
@@ -195,7 +195,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return salesReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
+        return settleReceiptList(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++) {
@@ -260,7 +260,7 @@ export default {
         centered: true,
         onOk () {
           _this.spinning = true
-          salesReceipt({ sn: row.salesBillSn }).then(res => {
+          settleReceipt({ sn: row.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()

+ 130 - 0
src/views/salesManagement/examineVerify/auditRejectModal.vue

@@ -0,0 +1,130 @@
+<template>
+  <a-modal
+    centered
+    class="auditRejectModal-modal"
+    :footer="null"
+    :maskClosable="false"
+    :closable="false"
+    title="备注原因"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="800">
+    <div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="auditRejectModal-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="备货单号">
+            {{ (itemData && itemData.dispatchBillNo) || '--' }}
+          </a-form-model-item>
+          <a-form-model-item label="原因" prop="remarks">
+            <a-input
+              id="auditRejectModal-remarks"
+              :maxLength="100"
+              type="textarea"
+              v-model="form.remarks"
+              ref="remarks"
+              placeholder="请输入原因(最多100个字符)"
+              allowClear />
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="auditRejectModal-save" @click="handleSave">提交</a-button>
+          <a-button id="auditRejectModal-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'AuditRejectModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    spinning: {
+      type: Boolean,
+      default: false
+    },
+    itemData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 17 }
+      },
+      form: {
+        remarks: ''
+      },
+      rules: {
+        remarks: [
+          { required: false, message: '请输入原因', trigger: 'blur' }
+        ]
+      },
+      detailData: null //  数据详情
+    }
+  },
+  methods: {
+    // 保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$emit('ok', _this.form.remarks)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        // 默认首项获取焦点
+        const _this = this
+        setTimeout(() => {
+          if (_this.$refs['remarks']) {
+            _this.$refs['remarks'].focus()
+          }
+        }, 300)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .auditRejectModal-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 30px;
+    }
+  }
+</style>

+ 32 - 6
src/views/salesManagement/examineVerify/list.vue

@@ -120,6 +120,7 @@
     </a-spin>
     <!-- 审核 -->
     <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('OUTING_WAREHOUSE')" @fail="auditOrder('STOCK_UP_REJECT')" />
+    <auditRejectModal :openModal="visibleAuditReject" :spinning="spinningAuditReject" :itemData="auditInfo" @close="visibleAuditReject=false" @ok="auditReject" />
   </a-card>
 </template>
 
@@ -132,9 +133,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import auditRejectModal from './auditRejectModal.vue'
 import { dispatchlList, dispatchQueryCount, dispatchStockUpAduit } from '@/api/dispatch'
 export default {
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, auditModal, subarea },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, auditModal, subarea, auditRejectModal },
   data () {
     return {
       spinning: false,
@@ -200,8 +202,10 @@ export default {
       },
       addrProvinceList: [], //  省下拉
       visibleAudit: false,
+      visibleAuditReject: false,
       auditInfo: null,
-      spinningAudit: false
+      spinningAudit: false,
+      spinningAuditReject: false
     }
   },
   methods: {
@@ -235,22 +239,44 @@ export default {
       this.visibleAudit = true
     },
     auditOrder (billStatus) {
+      if (billStatus == 'STOCK_UP_REJECT') { // 审核不通过
+        this.visibleAuditReject = true
+      } else {
+        const params = {
+          dispatchBillSn: this.auditInfo.dispatchBillSn,
+          billStatus: billStatus
+        }
+        this.auditFun(params)
+      }
+    },
+    auditFun (params) {
       this.spinningAudit = true
-      dispatchStockUpAduit({
-        dispatchBillSn: this.auditInfo.dispatchBillSn,
-        billStatus: billStatus
-      }).then(res => {
+      this.spinningAuditReject = true
+      dispatchStockUpAduit(params).then(res => {
         if (res.status == 200) {
           this.visibleAudit = false
+          this.visibleAuditReject = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
           this.spinningAudit = false
+          this.spinningAuditReject = false
         } else {
           this.visibleAudit = false
+          this.visibleAuditReject = false
           this.spinningAudit = false
+          this.spinningAuditReject = false
         }
       })
     },
+    // 审核不通过  提交
+    auditReject (remarks) {
+      const params = {
+        dispatchBillSn: this.auditInfo.dispatchBillSn,
+        billStatus: 'STOCK_UP_REJECT',
+        remarks: remarks
+      }
+      this.auditFun(params)
+    },
     //  详情
     handleDetail (row) {
       this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })

+ 4 - 0
src/views/salesManagement/salesQuery/detail.vue

@@ -45,6 +45,10 @@
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions size="small" :column="3">
+              <a-descriptions-item label="销售单号" :span="2">
+                {{ detailData&&detailData.salesBillNo || '--' }}
+                <span v-if="detailData&&detailData.salesBillNoSource">(原:{{ detailData&&detailData.salesBillNoSource || '--' }})</span>
+              </a-descriptions-item>
               <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress }}</a-descriptions-item>
               <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>