lilei 4 lat temu
rodzic
commit
4b96ffe792

+ 9 - 1
src/api/settleExpense.js

@@ -44,10 +44,18 @@ export const findExpenseDetail = (params) => {
   })
 }
 
-// 删除付款
+// 删除
 export const delExpense = (params) => {
   return axios({
     url: `settle/expense/delete/${params.id}`,
     method: 'get'
   })
+}
+
+// 审核
+export const auditExpense = (params) => {
+  return axios({
+    url: `settle/expense/audit/${params.id}`,
+    method: 'post'
+  })
 }

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

@@ -398,7 +398,7 @@ export const asyncRouterMap = [
                 name: 'purchaseOrderWarehousing',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
                 meta: {
-                  title: '入库',
+                  title: '采购入库',
                   icon: 'money-collect',
                   hidden: true
                   // permission: 'B_goodsManage_edit'

+ 18 - 24
src/views/financialManagement/expenseManagement/detailModal.vue

@@ -10,12 +10,12 @@
     :width="600">
     <!-- 详情 -->
     <div v-if="detailsData">
-      <a-descriptions :column="1" size="default">
-        <a-descriptions-item label="费用类型">{{ detailsData.productName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="费用金额">{{ detailsData.productCode || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="结算方式">{{ detailsData.origCode || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="关联单号">{{ detailsData.unit || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="备注">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
+      <a-descriptions :column="1" size="default" v-if="detailsData">
+        <a-descriptions-item label="费用单号">{{ detailsData.accountExpensesSn || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="费用类型">{{ [detailsData.expensesTypeName1, detailsData.expensesTypeName2, detailsData.expensesTypeName3].join(' > ') }}</a-descriptions-item>
+        <a-descriptions-item label="费用金额">¥{{ detailsData.settleAmount || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="单据状态">{{ detailsData.stateDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="备注">{{ detailsData.remark || '--' }}</a-descriptions-item>
       </a-descriptions>
       <div class="btn-cont"><a-button id="expenseManagementDetail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>
@@ -23,9 +23,9 @@
 </template>
 
 <script>
-import { dealerProductDetail } from '@/api/dealerProduct'
+import { findExpenseDetail } from '@/api/settleExpense'
 export default {
-  name: 'expenseManagementDetailModal',
+  name: 'ExpenseManagementDetailModal',
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -39,26 +39,19 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      // detailsData: null, //  详情数据
-      detailsData: {
-        productName: '',
-        productCode: '',
-        origCode: '',
-        unit: '',
-        productBrandName: '',
-      }
+      detailsData: null
     }
   },
   methods: {
     //  获取详情
-    getDetail(){
-		// dealerProductDetail({ id: this.itemId }).then(res => {
-		// 	if (res.status == 200) {
-		// 		this.detailsData = res.data
-		// 	}else{
-		// 		this.detailsData = null
-		// 	}
-		// })
+    getDetail () {
+      findExpenseDetail({ id: this.itemId }).then(res => {
+      	if (res.status == 200) {
+      		this.detailsData = res.data
+      	} else {
+      		this.detailsData = null
+      	}
+      })
     }
   },
   watch: {
@@ -70,6 +63,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailsData = null
       }
     },
     itemId (newValue, oldValue) {

+ 28 - 43
src/views/financialManagement/expenseManagement/list.vue

@@ -20,7 +20,7 @@
                 @change="changeCostType"
                 change-on-select
                 v-model="costType"
-				expand-trigger="hover"
+                expand-trigger="hover"
                 :options="costTypeList"
                 :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
                 id="productInfoList-costType"
@@ -72,12 +72,20 @@
       :data="loadData"
       :scroll="{ x: 1120, y: tableHeight }"
       bordered>
+
       <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
+      <template slot="accountExpensesSn" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ text }}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_AUDIT'"
+          class="button-warring"
+          @click="handleAudit(record)"
+          id="expenseManagement-edit-btn">审核</a-button>
         <a-button
           size="small"
           type="link"
@@ -92,23 +100,16 @@
           class="button-error"
           @click="handleDel(record)"
           id="expenseManagement-del-btn">删除</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'AUDIT_PASS'"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="expenseManagement-detail-btn">详情</a-button>
       </template>
     </s-table>
     <!-- 详情 -->
-    <expense-management-detail-modal :openModal="openModal" :itemId="itemId" @close="openModal=false" />
+    <expense-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeDetail" />
   </a-card>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import { settleExpenseQuery, delExpense, settleExpenseQuerySum } from '@/api/settleExpense'
+import { settleExpenseQuery, delExpense, settleExpenseQuerySum, auditExpense } from '@/api/settleExpense'
 import { costTypeAllQuery } from '@/api/costType'
 import expenseManagementDetailModal from './detailModal.vue'
 import moment from 'moment'
@@ -141,7 +142,7 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '费用单号', dataIndex: 'accountExpensesSn', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '费用单号', dataIndex: 'accountExpensesSn', width: 250, align: 'center', scopedSlots: { customRender: 'accountExpensesSn' } },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '费用类型', dataIndex: 'name', align: 'center', customRender: function (text, record) { return [record.expensesTypeName1, record.expensesTypeName2, record.expensesTypeName3].join(' > ') } },
         { title: '金额', dataIndex: 'settleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
@@ -200,6 +201,10 @@ export default {
         this.costTypeList = res.data
       })
     },
+    closeDetail () {
+      this.openModal = false
+      this.itemId = null
+    },
     //  费用类型  change
     changeCostType (val, opt) {
       this.queryParam.expensesTypeSn1 = val[0] ? val[0] : ''
@@ -214,47 +219,27 @@ export default {
         this.$router.push({ name: 'expenseManagementAdd' })
       }
     },
-    //  提交
-    handleSubmit (row) {
-      const _this = this
-      _this.itemId = item.id
-      _this.$confirm({
-        title: '提示',
-        content: '确定要进行提交操作吗?',
-        centered: true,
-        onOk () {
-          // dealerProductTypeDel({ id: _this.itemId }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    },
     //  详情
     handleDetail (row) {
       this.itemId = row.id
       this.openModal = true
-      // this.$router.push({ path: `/financialManagement/expenseManagement/detail/${row.id}`})
     },
     //  审核
-    handleExamine (row, type) {
+    handleAudit (row, type) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
+        content: '确定要审核吗?',
         centered: true,
         onOk () {
-          // delectRolePower({
-          //   id: row.id
-          // }).then(res => {
-          //   console.log(res, 'res1111')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          auditExpense({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
         }
       })
     },

+ 2 - 2
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -103,10 +103,10 @@ export default {
         { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 140, align: 'center', customRender: function (text) { return text = ' ' ? '--' : text } },
         { title: '采购单价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
-        { title: '货数量', dataIndex: 'oosQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
+        { title: '本次发货数量', dataIndex: 'oosQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
         { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) }, fixed: 'right' },
-        { title: '入库数量', dataIndex: 'putQty', width: 100, align: 'center', fixed: 'right' },
+        { title: '本次入库数量', dataIndex: 'putQty', width: 100, align: 'center', fixed: 'right' },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: 250, align: 'center', fixed: 'right' }
       ],
       chooseLoadData: [],