codeMan пре 2 година
родитељ
комит
397375169c

+ 1 - 1
src/HDrpManagement/cashcoupon/component/detailed.vue

@@ -9,7 +9,7 @@
         <el-descriptions-item label="金额">{{ data.amount?data.amount:"--"}}</el-descriptions-item>
         <el-descriptions-item label="分类明细">{{ data.subclass?data.subclass:"--"}}</el-descriptions-item>
         <el-descriptions-item :style="style(data.status)" label="状态">
-          <sapn :style="colorStyle">{{ data.status?data.status:"--" }}</sapn>
+          <span :style="colorStyle">{{ data.status?data.status:"--" }}</span>
         </el-descriptions-item>
         <el-descriptions-item label="返利金有效期">{{ data.rebate_enddate?data.rebate_enddate:"--" }}</el-descriptions-item>
         <el-descriptions-item label="余额">{{ data.rebate_balance?data.rebate_balance:"--" }}</el-descriptions-item>

+ 2 - 0
src/HDrpManagement/cashcoupon/component/payDetails.vue

@@ -46,6 +46,7 @@ export default {
   },
   methods:{
     async listData(){
+      this.param.content.sa_cashbillid = this.$route.query.id
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.tatal
@@ -63,6 +64,7 @@ export default {
     },
   },
   created() {
+    this.listData()
     this.tablecols = this.tool.tabelCol(this.$route.name).payDetailsTable.tablecols
   }
 

+ 127 - 0
src/HDrpManagement/recvoucher/components/writeoffBill.vue

@@ -0,0 +1,127 @@
+
+<template>
+  <div>
+    <div style="display:flex;align-items:center">
+      <el-input
+          placeholder="请输入搜索内容"
+          suffix-icon="el-icon-search"
+          v-model="params.content.where.condition"
+          style="width:200px"
+          size="mini"
+          class="input-with-select inline-16"
+          @keyup.native.enter="listData(params.content.pageNumber=1)"
+          @clear="clearData"
+          clearable>
+      </el-input>
+      <slot name="addProduct"></slot>
+    </div>
+    <div style="margin-top: 15px">
+      <tableLayout :layout="tablecols" :data="list" :opwidth="200"  :custom="true" :width="false"  :height="tableHieght" fixedName="operation">
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname == 'price'">
+            <el-input size="small" v-if="currentProduct.sa_aftersalesmag_itemsid == scope.column.data.sa_aftersalesmag_itemsid" v-model="scope.column.data.price"></el-input>
+            <span v-else>{{scope.column.data.price}}</span>
+          </div>
+          <div v-else-if="scope.column.columnname == 'qty'">
+            <el-input size="small" v-if="currentProduct.sa_aftersalesmag_itemsid == scope.column.data.sa_aftersalesmag_itemsid" v-model="scope.column.data.qty"></el-input>
+            <span v-else>{{scope.column.data.qty}}</span>
+          </div>
+          <div v-else-if="scope.column.columnname == 'reason'">
+            <div v-if="currentProduct.sa_aftersalesmag_itemsid == scope.column.data.sa_aftersalesmag_itemsid">
+              <el-input type="textarea" size="mini" v-model="scope.column.data.reason"></el-input>
+            </div>
+            <div v-else>{{scope.column.data.reason ? scope.column.data.reason : '--'}}</div>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+          <p v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'&& scope.column.columnname != 'reason'">--</p>
+        </template>
+        <template v-slot:opreation="scope">
+          <!-- <el-button @click="goDetail(scope)" size="mini" type="text">详 情</el-button> -->
+        </template>
+      </tableLayout>
+    </div>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="params.content.pageNumber"
+          :page-size="params.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props:["data"],
+  data () {
+    return {
+      tableHieght:"calc(100vh - 380px)",
+      tablecols:[],
+      list:[],
+      total:0,
+      params:{
+        "id":20230224185904,
+        "version":1,
+        "content": {
+            "sa_cashbillid":'',
+            "pageNumber":1,
+            "pageSize":20,
+            "where":{
+              "condition":''
+            }
+        }
+      },
+      options:[
+      ],
+      productList:'',
+      currentProduct:{}
+    }
+  },
+  methods:{
+    goDetail (scope) {
+      let route = this.$route
+      if (route.path !== '/taskDetails') {
+        this.oldRoute = {path:route.path,query:route.query}
+        this.$store.dispatch('setHistoryRouter',this.oldRoute)
+      }
+      this.$router.replace({path:'/workorderDetail',query:{id:scope.data.sa_workorderid,rowindex:scope.data.rowindex}})
+    },
+    async listData(){
+      this.params.content.sa_cashbillid = this.$route.query.id
+      const res = await this.$api.requested(this.params)
+      this.list = res.data
+      this.total = res.total
+      console.log(this.list)
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.listData()
+    },
+    clearData(){
+      this.listData()
+    },
+    queryClick(){
+      this.listData()
+    }
+  },
+  created() {
+    this.listData()
+    this.tablecols = this.tool.tabelCol(this.$route.name).writeoffbillTable.tablecols
+  }
+}
+
+</script>
+<style scoped>
+
+</style>

+ 23 - 6
src/HDrpManagement/recvoucher/details/index.vue

@@ -3,7 +3,7 @@
     <basicDetails
         ref="details"
         :titleText="mainData.billno"
-        formPath="payvoucher"
+        formPath="revoucher"
         :editData="mainData"
         :mainAreaData="mainAreaData"
         :turnPageId="20221010102903"
@@ -11,7 +11,7 @@
         idname="sa_cashbillid"
         ownertable="sa_cashbill"
         tags=""
-        :tabs="['详细信息']"
+        :tabs="['详细信息','核销单查询']"
         :statusCheck="[{key:'status',value:'审核'}]"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
@@ -21,6 +21,16 @@
         <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
       </div>
       <div slot="customOperation">
+        <customBtn 
+          btnName="一键核销"
+          message="确认核销当前收入凭证吗?"
+          idName="20230224183304"
+          keyName="sa_cashbillid"
+          :id="$route.query.id"
+          @onSuccess="queryMainData($route.query.id);$refs.bill && $refs.bill.listData()"
+          class="inline-16"
+          v-if="mainData.status == '审核' && tool.checkAuth($route.name,'writeoff') && mainData.unwriteoffamount > 0"
+        />
         <examine class="inline-16" v-if="tool.checkAuth($route.name,'check')" :data="mainData"  @examineSuccess="onSuccess"></examine>
         <!-- 此区域提供了自定义操作按钮 -->
 <!--        <div class="inline-16" v-if="tool.checkAuth($route.name,'receive') && mainData.freeget === 1 && length === 0 ">
@@ -36,6 +46,9 @@
       <div slot="slot0" >
         <detailed  :detailData="mainData"></detailed>
       </div>
+      <div slot="slot1" >
+        <writeoffBill ref="bill"></writeoffBill>
+      </div>
     </basicDetails>
   </div>
 </template>
@@ -43,9 +56,11 @@
 <script>
 import detailed from './modules/detailedData'
 import examine from './modules/examine'
+import writeoffBill from '../components/writeoffBill'
+import { log } from '@antv/g2plot/lib/utils'
 export default {
   name: "index",
-  components:{detailed,examine},
+  components:{detailed,examine,writeoffBill},
   data(){
     return {
       mainData:{},
@@ -62,6 +77,8 @@ export default {
         }
       })
       this.mainData = res.data
+      console.log(this.mainData);
+      
       this.changeDataStructure()
     },
     changeDataStructure(){
@@ -98,7 +115,7 @@ export default {
           value:this.mainData.enterprisename
         },
         {
-          label:'金额',
+          label:'核销金额',
           value:this.mainData.amount
         },
         {
@@ -126,8 +143,8 @@ export default {
           value:this.mainData.remarks
         },
         {
-          label:'确认金额',
-          value:this.mainData.status === '审核'?this.mainData.amount:'--'
+          label:'未核销金额',
+          value:this.mainData.unwriteoffamount
         },
       ]
     },

+ 1 - 1
src/HDrpManagement/serveBill/components/workProgress.vue

@@ -18,7 +18,7 @@
             width="180">
           </el-table-column>
           <el-table-column
-            prop="enterprisename"
+            prop="projectleader"
             label="工单负责人"
             width="180">
           </el-table-column>