Bladeren bron

发票管理

changhaoning 1 jaar geleden
bovenliggende
commit
69bcea83ef

+ 1 - 0
src/api/pages/mst/company-trade.js

@@ -6,6 +6,7 @@
 export default {
   cpTradeService:{
     prefix: '/mdm-server/mst/cpTrade/',
+    selectReceipt:'select_receipt'
   }
 }
 

+ 1 - 0
src/api/pages/mst/receipt.js

@@ -18,5 +18,6 @@ export default {
  */
 export const routeUrl = {
   receipt:{
+    invoicing:{key: 'costCheck', method: 'costCheck'},
   }
 }

+ 7 - 3
src/locale/lang/zh-CN.js

@@ -382,7 +382,7 @@ export const columns = {
   balance: '期初金额',
   pricePurchase: '采购标价',
   supplierType: '供应商类型',
-  receiptAmt: '收款金额',
+  receiptAmt: '开票金额',
   addressName: '小区',
   supName: '供应商名称',
   supCode: '供应商编码',
@@ -447,7 +447,7 @@ export const columns = {
   sumAmtRec: '收款合计金额',
   handleAmt: '还款金额',
   residueAmt: '剩余金额',
-  receiptDate: '收款日期',
+  receiptDate: '开票日期',
   accountBalance: '账户金额',
   entryQty: '入库数量',
   entryAmt: '入库金额',
@@ -645,7 +645,11 @@ export const columns = {
   receiptObj:'开票方名称',
   taxRate:'税率',
   tradeDesc:'交易描述',
-  receiptStatus:'开票标识'
+  receiptStatus:'开票状态',
+  clickCount:'点击次数',
+  invoiceRecords:'开票记录',
+  receiptStaff:'开票人',
+
 }
 
 /**

+ 71 - 74
src/view/mst/company/index.vue

@@ -9,7 +9,7 @@
         <BaseIndexButton ref="edit" name="edit"></BaseIndexButton>
         <BaseIndexButton ref="operation" name="operation"></BaseIndexButton>
         <BaseIndexButton ref="upOwner" name="upOwner"></BaseIndexButton>
-        <BaseIndexButton ref="invoicing" name="invoicing"></BaseIndexButton>
+<!--        <BaseIndexButton ref="invoicing" name="invoicing"></BaseIndexButton>-->
       </template>
       <template #right>
         <BaseIndexButton ref="add" name="add"></BaseIndexButton>
@@ -36,7 +36,7 @@
                  :choose-flag="false"
                  @current-change="currentChange($event)"
                  :height="this.tableHeight * split - 35" showFooter>
-          <DkTableColumn field="invoicingFlag" type="switch"/>
+<!--          <DkTableColumn field="invoicingFlag" type="switch"/>-->
           <DkTableColumn field="cpCode"></DkTableColumn>
           <DkTableColumn field="cpName"></DkTableColumn>
           <DkTableColumn field="svcCode"></DkTableColumn>
@@ -82,7 +82,7 @@
       <DkForm ref="formInline" v-model="formData" :col-count="1" :labelMaxWords="6">
         <!--公司-->
         <DkFormItem prop="cpName">
-         <input-pop v-model="formData.cpName" :disabled="true"/>
+          <input-pop v-model="formData.cpName" :disabled="true"/>
         </DkFormItem>
         <!--业务员-->
         <DkFormItem prop="staffId" :label="$t('staffId')" :required="true">
@@ -98,12 +98,12 @@
                            @ok="staffOk"/>
         </DkFormItem>
         <!--运维用户-->
-        <DkFormItem prop="userPhone" :required="true" >
+        <DkFormItem prop="userPhone" :required="true">
           <InputPop v-model="formData.userPhone" :telephone="true"/>
         </DkFormItem>
       </DkForm>
-      <DkButton slot="footer" @click="bindStaff">{{'绑定'}}</DkButton>
-      <DkButton slot="footer" @click="NoBindStaff">{{'解绑'}}</DkButton>
+      <DkButton slot="footer" @click="bindStaff">{{ '绑定' }}</DkButton>
+      <DkButton slot="footer" @click="NoBindStaff">{{ '解绑' }}</DkButton>
     </DkModal>
 
     <!--责任人转让-->
@@ -160,18 +160,18 @@ export default {
         svcIp:null,
         svcPort:null,
         staffId: null,
-        staffCode:null,
+        staffCode: null,
         staffName: null,
-        userPhone:null,
+        userPhone: null,
       },
-      ownerData:{
-        cpId:null,
-        cpName:null,
-        svcCode:null,
-        svcIp:null,
-        svcPort:null,
+      ownerData: {
+        cpId: null,
+        cpName: null,
+        svcCode: null,
+        svcIp: null,
+        svcPort: null,
         staffId: null,
-        staffCode:null,
+        staffCode: null,
         staffName: null,
       },
       searchContent: [
@@ -236,10 +236,10 @@ export default {
     },
 
     /**
-    * @desc   : 开具发票验证
-    * @author : 常皓宁
-    * @date   : 2024/8/5 13:24
-    */
+     * @desc   : 开具发票验证
+     * @author : 常皓宁
+     * @date   : 2024/8/5 13:24
+     */
     openValidData(btnName, rows) {
       if (rows && rows[0] && btnName === 'invoicing') {
         if (!rows[0].invoicingFlag) {
@@ -251,11 +251,11 @@ export default {
     },
 
     /**
-    * @desc   : 问题运维绑定工号
-    * @author : 常皓宁
-    * @date   : 2024/6/19 9:01
-    */
-    operation({rows}){
+     * @desc   : 问题运维绑定工号
+     * @author : 常皓宁
+     * @date   : 2024/6/19 9:01
+     */
+    operation({rows}) {
       if (!rows) {
         rows = [this.$refs['table-select'].getCurrentRow()]
       }
@@ -268,11 +268,11 @@ export default {
     },
 
     /**
-    * @desc   : 责任人转让
-    * @author : 常皓宁
-    * @date   : 2024/6/24 11:23
-    */
-    upOwner({rows}){
+     * @desc   : 责任人转让
+     * @author : 常皓宁
+     * @date   : 2024/6/24 11:23
+     */
+    upOwner({rows}) {
       if (!rows) {
         rows = [this.$refs['table-select'].getCurrentRow()]
       }
@@ -285,11 +285,11 @@ export default {
     },
 
     /**
-    * @desc   : 选择员工
-    * @author : 常皓宁
-    * @date   : 2024/6/19 16:48
-    */
-    staffOk(val){
+     * @desc   : 选择员工
+     * @author : 常皓宁
+     * @date   : 2024/6/19 16:48
+     */
+    staffOk(val) {
       this.formData.staffCode = val[0]['staffCode']
       this.formData.staffName = val[0]['staffName']
     },
@@ -299,7 +299,7 @@ export default {
      * @author : 常皓宁
      * @date   : 2024/6/19 16:48
      */
-    ownerOk(val){
+    ownerOk(val) {
       this.ownerData.staffCode = val[0]['staffCode']
       this.ownerData.staffName = val[0]['staffName']
       this.ownerData.staffId = val[0]['staffId']
@@ -307,48 +307,45 @@ export default {
     },
 
     /**
-    * @desc   : 绑定
-    * @author : 常皓宁
-    * @date   : 2024/6/19 16:30
-    */
-    bindStaff(){
+     * @desc   : 绑定
+     * @author : 常皓宁
+     * @date   : 2024/6/19 16:30
+     */
+    bindStaff() {
       this.$refs['formInline'].validate().then(valid => {
-        console.log('sdas',typeof(this.formData.userPhone))
         if (!valid) {
           return
         } else {
           let params = {...this.formData}
-          console.log('this.params', this.params)
-         this.excute(this.$service.companyService, this.$service.companyService.bindStaff, params).then(res=>{
-           if (res.code === this.$config.SUCCESS_CODE) {
-             this.$Message.success(res.message)
-           }else{
-             this.$Message.warning(res.message)
-           }
-         })
+          this.excute(this.$service.companyService, this.$service.companyService.bindStaff, params).then(res => {
+            if (res.code === this.$config.SUCCESS_CODE) {
+              this.$Message.success(res.message)
+            } else {
+              this.$Message.warning(res.message)
+            }
+          })
         }
       })
     },
 
     /**
-    * @desc   : 解绑
-    * @author : 常皓宁
-    * @date   : 2024/6/20 9:39
-    */
-    NoBindStaff(){
+     * @desc   : 解绑
+     * @author : 常皓宁
+     * @date   : 2024/6/20 9:39
+     */
+    NoBindStaff() {
       this.$refs['formInline'].validate().then(valid => {
         if (!valid) {
           return
         } else {
           let params = {...this.formData}
-          console.log('this.params', this.params)
           this.excute(this.$service.companyService, this.$service.companyService.NoBindStaff, params).then(res => {
             if (res.code === this.$config.SUCCESS_CODE) {
               this.$Message.success(res.message)
               this.formData = {}
               this.bindModal = false
               this.searchData()
-            }else{
+            } else {
               this.$Message.warning(res.message)
             }
           })
@@ -357,25 +354,25 @@ export default {
     },
 
     /**
-    * @desc   : 责任人转让
-    * @author : 常皓宁
-    * @date   : 2024/6/24 17:01
-    */
+     * @desc   : 责任人转让
+     * @author : 常皓宁
+     * @date   : 2024/6/24 17:01
+     */
     upOwnerOk() {
-        let params = this.ownerData
-        this.loading = true;
-        this.excute(this.$service.companyService, this.$service.companyService.upOwner,
-          params, true).then(res=>{
-          if(res.code === this.$config.SUCCESS_CODE){
-            this.$Message.success(res.message)
-            // 关闭窗体
-            this.upOwnerModal = false;
-            this.searchData()
-          }else{
-            this.$Message.warning(res.message)
-          }
-          this.loading = false;
-        })
+      let params = this.ownerData
+      this.loading = true;
+      this.excute(this.$service.companyService, this.$service.companyService.upOwner,
+        params, true).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.$Message.success(res.message)
+          // 关闭窗体
+          this.upOwnerModal = false;
+          this.searchData()
+        } else {
+          this.$Message.warning(res.message)
+        }
+        this.loading = false;
+      })
     },
 
   },

+ 144 - 0
src/view/mst/receipt/index.vue

@@ -0,0 +1,144 @@
+<!-- @desc:发票管理  @auth:常皓宁  @time:2024年8月13日09:01:32 -->
+<template>
+  <div class="main-div" ref="mainDiv">
+    <loading :loading="loading" v-if="!modalVisible"></loading>
+    <!--按钮区-->
+    <BaseIndexButtonGroup ref="BaseIndexButtonGroup" id="BaseIndexButtonGroup">
+      <template #left>
+        <!--    查询    -->
+        <BaseIndexButton ref="search" name="search"></BaseIndexButton>
+        <!--    清空条件    -->
+        <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
+        <!--    开具发票    -->
+        <BaseIndexButton ref="invoicing" name="invoicing"></BaseIndexButton>
+      </template>
+    </BaseIndexButtonGroup>
+
+    <!--  卡片区  -->
+    <div class="index-card">
+      <!--  查询条件区域  -->
+      <div id="search-cond-div" ref="search-cond-div" class="search-cond-class">
+        <SearchCond ref="searchCond" v-model="searchCond"
+                    @collapse-change="collapseChange" :setFlag="false"
+                    :search-content="searchContent"></SearchCond>
+      </div>
+
+      <!--  表格部分  -->
+      <DkTable
+        ref="checkTable"
+        :data="formData"
+        :height="tableHeight"
+        :page-flag="false"
+        :page-total-flag="false"
+        :show-setting-flag="false"
+        show-footer
+        primaryKey="tradeId"
+        :freeze="false">
+        <DkTableColumn field="tradeNo"></DkTableColumn>
+        <DkTableColumn field="cpName"></DkTableColumn>
+        <DkTableColumn field="tradeAmount" width="220"></DkTableColumn>
+        <DkTableColumn field="tradeTime" width="auto"></DkTableColumn>
+        <DkTableColumn field="applyDate" width="auto"></DkTableColumn>
+        <DkTableColumn field="receiptDate" width="auto"></DkTableColumn>
+        <DkTableColumn field="tradeTypeName" :title="$t('tradeType')"></DkTableColumn>
+        <DkTableColumn field="tradeStatusName" :title="$t('tradeStatus')" width="auto"></DkTableColumn>
+        <DkTableColumn field="receiptStatusName" :title="$t('invoiceStatue')"/>
+        <DkTableColumn field="receiptTypeName" :title="$t('invoiceType')"></DkTableColumn>
+        <DkTableColumn field="taxNo" width="auto"></DkTableColumn>
+        <DkTableColumn field="cpEmail" width="auto"></DkTableColumn>
+        <DkTableColumn field="receiptAmt" width="auto"></DkTableColumn>
+        <DkTableColumn field="receiptContent" width="auto"></DkTableColumn>
+      </DkTable>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import {indexMixin} from "@/mixins";
+
+export default {
+  name: "receipt",
+  mixins: [indexMixin],
+  data() {
+    let self = this
+    return {
+      // 查询条件
+      searchContent: [
+        {
+          itemCode: '开票状态-下拉',
+          itemName: 'receiptStatus',
+          valueFormat: {
+            code: 'receiptStatus',
+            data: [
+              {receiptStatus: '未开票'},
+              {receiptStatus: '开票中'},
+              {receiptStatus: '已开票'},
+            ],
+            valueKey: 'receiptStatus',
+            labelKey: 'receiptStatus',
+          },
+          valueKind: 'S-CHOICE'
+        },
+      ],
+    }
+  },
+  methods: {
+    /**
+     * @desc   : 开具发票
+     * @author : 常皓宁
+     * @date   : 2024/4/17 13:25
+     */
+    invoicing(){
+      let changeTable = this.$refs['checkTable'].getCheckRows();
+      console.log('changeTable',changeTable)
+      this.$IBMessage({content: this.$t('Q_002', {'param': this.$v('入库成本核对')}), title: this.$t('systemQuestion')},
+        {
+          ok: () => {
+            this.loading = true
+            let params = changeTable
+            this.excute(this.$service.costCheckService, this.$service.costCheckService.costCheckOk, params, false).then(res => {
+              if (res.code === this.$config.SUCCESS_CODE) {
+                this.$Message.success(this.$t('I_001', {'param': this.$t('入库成本核对')}))
+                this.searchData()
+              } else {
+                this.$Message.warning(res.message)
+              }
+              this.loading = false
+            })
+          }
+        })
+    },
+    /**
+     * @desc   : 查询数据
+     * @author : 常皓宁
+     * @date   : 2024/4/17 9:19
+     */
+    getData(params) {
+      delete params.currentPage
+      delete params.pageSize
+
+      this.excute(this.$service.cpTradeService, this.$service.cpTradeService.selectReceipt, params).then(res =>{
+        if (res.code === this.$config.SUCCESS_CODE) {
+          let data = []
+          res.data.list.forEach(it =>{
+            it.oldCostPrice = it.costPrice
+            it.oldCostAmt = it.costAmt
+            data.push(it)
+          })
+          this.formData = data
+        }else {
+          this.$Message.warning(res.message)
+        }
+        this.loading = false;
+      })
+    },
+  },
+  created() {
+    this.primaryKey = 'tradeId'  // 设置主键Id
+    this.routeObjName = 'cpTrade'  // 设置路由名称
+  }
+}
+</script>
+
+