Переглянути джерело

Merge branch 'blueUrgent' into nextUpdate

qymljy 2 роки тому
батько
коміт
ac5ae6e0eb

+ 7 - 3
src/HDrpManagement/recvoucher/details/index.vue

@@ -11,7 +11,7 @@
         idname="sa_cashbillid"
         ownertable="sa_cashbill"
         tags=""
-        :tabs="['核销单查询','详细信息']"
+        :tabs="['核销单查询','对冲凭证查询','详细信息']"
         :statusCheck="[{key:'status',value:'审核'}]"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
@@ -57,12 +57,15 @@
           <to_void  :id="mainData.sa_customersid" @onshow="onSuccess" @toVoidSuccess="onSuccess"></to_void>
         </div>-->
       </div>
-      <div slot="slot1" >
+      <div slot="slot2" >
         <detailed  :detailData="mainData"></detailed>
       </div>
       <div slot="slot0" >
         <writeoffBill ref="bill"></writeoffBill>
       </div>
+      <div slot="slot1" >
+        <hedgeVoucher ref="hedgeVoucher"></hedgeVoucher>
+      </div>
     </basicDetails>
   </div>
 </template>
@@ -71,10 +74,11 @@
 import detailed from './modules/detailedData'
 import examine from './modules/examine'
 import writeoffBill from '../components/writeoffBill'
+import hedgeVoucher from './modules/hedgeVoucher'
 import { log } from '@antv/g2plot/lib/utils'
 export default {
   name: "index",
-  components:{detailed,examine,writeoffBill},
+  components:{detailed,examine,writeoffBill,hedgeVoucher},
   data(){
     return {
       mainData:{},

+ 117 - 0
src/HDrpManagement/recvoucher/details/modules/hedgeVoucher.vue

@@ -0,0 +1,117 @@
+<template>
+  <div>
+    <div style="display:flex;align-items:center">
+      <el-input
+          placeholder="请输入搜索内容"
+          suffix-icon="el-icon-search"
+          v-model="param.content.where.condition"
+          style="width:200px"
+          size="mini"
+          class="input-with-select inline-16"
+          @keyup.native.enter="listData(param.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>{{tool.formatAmount(scope.column.data.price,2)}}</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 == 'status'">
+            <span :style="{color:scope.column.data.status === '审核'?'#52C41A':'#000000'}">{{scope.column.data.status}}</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">
+        </template>
+      </tableLayout>
+    </div>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="param.content.pageNumber"
+          :page-size="param.content.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "hedgeVoucher",
+  data(){
+    return {
+      tablecols:[],
+      tableHieght:"calc(100vh - 380px)",
+      list:[],
+      total:0,
+      param:{
+        "id": 20231228165404,
+        "content": {
+          "sa_cashbillid":'',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  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.total
+      console.log(this.list,'对冲凭证')
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    clearData(){
+      this.listData()
+    },
+    queryClick(){
+      this.listData()
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).hedgeVoucherTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>