Explorar o código

Merge tag 'Hotfix-zh-103' into develop

Finish Hotfix-zh-103
howie %!s(int64=3) %!d(string=hai) anos
pai
achega
f578af478b

+ 10 - 0
src/api/finance/account_list.js

@@ -32,3 +32,13 @@ export function getWalletCustomerList(params) {
     params,
   });
 }
+
+// 贷款对账列表
+
+export function getFeconciliateList(params) {
+  return request({
+    url: "/finance/reconciliate/list",
+    method: "get",
+    params,
+  });
+}

+ 2 - 2
src/views/basic_data/stock/product_list.vue

@@ -53,13 +53,13 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="存货类别" >
-              <el-select v-model="screenForm.categoryId" style="width: 100%" placeholder="选择存货类别">
+              <el-select v-model="screenForm.categoryId" style="width: 100%" placeholder="选择存货类别" filterable clearable>
                 <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
 
-          <el-col class="tr">
+          <el-col :xs="24" :sm="12" :lg="12" class="tr">
             <el-form-item>
               <el-button @click="resetScreenForm">清空</el-button>
               <el-button type="primary" @click="submitScreenForm">搜索</el-button>

+ 258 - 0
src/views/finance/details/loan_list.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="app-container">
+    <div v-if="showReconciliation">
+      <!-- 筛选条件 -->
+      <div>
+        <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="钱包" prop="type">
+                <el-select v-model="searchForm.type" class="selectStyle" placeholder="请选择" filterable clearable>
+                  <el-option v-for="(v, i) in walletType" :key="i" :label="v.label" :value="v.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="月份" prop="month">
+              <el-date-picker
+                style="width: 100%"
+                v-model="searchForm.month"
+                type="month"
+                placeholder="选择月">
+              </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="对账状态" prop="isReconciliation">
+                <el-select v-model="searchForm.isReconciliation" class="selectStyle" placeholder="请选择对账状态" filterable clearable>
+                  <el-option v-for="(v, i) in statusList" :key="i" :label="v.label" :value="v.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="" class="fr">
+                <el-button size="mini" @click="clearFn">清空</el-button>
+                <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button :disabled="dataList.length == 0" type="primary" size="mini" @click="reconciliationFn">一键对账</el-button>
+<!--          <el-button type="primary" size="mini" @click="recordFn">记录</el-button>-->
+        </div>
+<!--        <div class="fr">-->
+<!--          <ExportButton :ex-url="'/finance/standing/book/export'" :ex-params="exParams" />-->
+<!--        </div>-->
+      </div>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe show-summary :summary-method="$getSummaries">
+<!--            <el-table-column align="left" label="序号" type="index" width="80" show-overflow-tooltip />-->
+            <el-table-column align="left" label="月份" prop="month" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="对账状态" prop="isReconciliation" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-tag v-if="scope.row.isReconciliation == false" size="mini" type="danger">未对账</el-tag>
+              </template>
+            </el-table-column>
+            <el-table-column align="left" label="经销商编码" prop="customerCode" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <CopyButton :copy-text="scope.row.customerCode" />
+                <span>{{ scope.row.customerCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <CopyButton :copy-text="scope.row.customerName" />
+                <span>{{ scope.row.customerName }}</span>
+              </template>
+            </el-table-column>
+
+            <el-table-column align="left" label="预付货款" prop="preFee" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="订单占款" prop="orderFee" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="支付货款" prop="payFee" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+              {{ scope.row.billNo }}
+              </template>
+            </el-table-column>
+            <el-table-column align="left" label="押金" prop="depositFee" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="工程押金" prop="projectFee" min-width="160" show-overflow-tooltip />
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+        </div>
+      </div>
+    </div>
+    <AccountListDetail v-else />
+  </div>
+</template>
+
+<script>
+import {
+  getCustomerList,
+  getFeconciliateList,
+  getFinanceStandingBookCheck,
+  getWalletCustomerList
+} from '@/api/finance/account_list'
+import AccountListDetail from '../components/account_list-detail'
+
+export default {
+  components: {
+    AccountListDetail
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {
+        customerId: '',
+        customerWalletId: '',
+        billNo: '',
+        startTime: '',
+        endTime: '',
+        type:null,
+        month:'',
+        isReconciliation:null,
+      }, // 搜索表单
+      listLoading: false, // 列表加载loading
+      showReconciliation: true,
+      statusList: [
+        {
+          value:true,
+          label:'是'
+        },
+        {
+          value:false,
+          label:'否'
+        }
+      ],
+      walletType: [
+        {
+          value:'COMMONLY',
+          label:'普通钱包'
+        },
+        {
+          value:'REBATE',
+          label:'返利钱包'
+        }
+      ]
+    }
+  },
+  computed: {
+    exParams() {
+      return {
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        isReconciliation: false
+      }
+    }
+  },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      ...this.searchForm,
+    })
+    this.getCustomerDataList({
+      pageSize: -1,
+      pageNum: 1
+    })
+  },
+  methods: {
+    // 清空
+    clearFn() {
+      this.$refs.searchForm.resetFields()
+      this.currentPage = 1;
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      })
+    },
+    // 搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+
+      })
+    },
+    // 改变经销商
+    async changeFn(v) {
+      this.searchForm.customerWalletId = ''
+      const res = await getWalletCustomerList({ customerId: v })
+      this.walletList = res.data
+    },
+    // 获取经销商数据
+    async getCustomerDataList(data) {
+      const res = await getCustomerList(data)
+      this.customerList = res.data.records
+    },
+    // 记录
+    recordFn() {
+      this.showReconciliation = false
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.currentPage = 1
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: false
+      })
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: false
+      })
+    },
+    // 获取列表
+    async getDataList(data) {
+      const res = await getFeconciliateList(data)
+      res.data.records.forEach((item) => {
+        item.sums1 = []
+        item.sums2 = ['amount']
+      })
+      this.dataList = res.data.records
+      this.listTotal = res.data.total
+    },
+    // 一键对账
+    async reconciliationFn() {
+      const res = await getFeconciliateList({
+        pageSize: -1,
+        pageNum: 1
+      })
+      const arr = res.data.records
+      const ids = arr.map((v) => v.id)
+      console.log(ids)
+
+      await getFinanceStandingBookCheck({ ids: ids.toString() })
+      this.$message.success('对账成功')
+    },
+    seeFN() {
+      this.showDetail = false
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.selectStyle {
+  width: 100%;
+}
+</style>

+ 1 - 1
src/views/supply/deliver/sum_list.vue

@@ -92,7 +92,7 @@
               </el-form-item>
             </el-col>
 
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
                 <el-button type="primary" @click="submitScreenForm">搜索</el-button>

+ 3 - 2
src/views/supply/implement/implement_list.vue

@@ -215,8 +215,9 @@
 </template>
 
 <script>
-import { getList } from "@/api/supply/implement";
-import { getCategoryList } from "@/api/common"
+import { getList } from '@/api/supply/implement'
+import { getCategoryList } from '@/api/common'
+
 let that
 export default {
   filters: {

+ 12 - 1
src/views/supply/retail/components/retail_form.vue

@@ -258,6 +258,7 @@
             <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleName" min-width="80" show-overflow-tooltip></el-table-column>
           </el-table>
           <div class="pagination clearfix" style="margin-top: 10px">
             <div class="fr">
@@ -286,6 +287,8 @@
             <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleName" min-width="80" show-overflow-tooltip></el-table-column>
+
           </el-table>
         </div>
       </div>
@@ -301,7 +304,15 @@
 </template>
 
 <script>
-import { getDetail, addData, editData, getSalesTypeList, getGoodsList, getWarehouseList, checkStock } from "@/api/supply/retail";
+import {
+  addData,
+  checkStock,
+  editData,
+  getDetail,
+  getGoodsList,
+  getSalesTypeList,
+  getWarehouseList
+} from '@/api/supply/retail'
 import { getDictList, getSalesmanList } from '@/api/common'
 import { findElem } from '@/utils/util'
 

+ 12 - 8
src/views/supply/sales/components/sales_return_form.vue

@@ -100,7 +100,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer">
         <el-button type="primary" @click="clickSubmitForm('SAVE')">保 存</el-button>
@@ -172,7 +172,11 @@
           <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
           <el-table-column align="left" label="销售出库单" prop="id" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="发货申请单号" prop="orderNo" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="订单号" prop="mainOrderId" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="left" label="订单号" prop="mainOrderId" min-width="120" show-overflow-tooltip>、
+            <template slot-scope="scope">
+              {{ (scope.row.orderType == 'TRADE' || scope.row.orderType == 'HOME') ? scope.row.enginOrderNo : scope.row.mainOrderId }}
+            </template>
+          </el-table-column>
           <el-table-column align="left" label="经销商" prop="customerName" min-width="250" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
@@ -191,7 +195,7 @@
           </div>
         </div>
       </div>
-      
+
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDialog">取 消</el-button>
         <el-button type="primary" @click="submitAddGoods">确 定</el-button>
@@ -202,8 +206,8 @@
 </template>
 
 <script>
-import { addReturn, getSalesGoodsList, getWarehouseList, getDealerList } from "@/api/supply/sales";
-import { getDictList, getCategoryList } from '@/api/common'
+import { addReturn, getDealerList, getSalesGoodsList, getWarehouseList } from '@/api/supply/sales'
+import { getCategoryList, getDictList } from '@/api/common'
 import fileUpload from '@/components/Common/file-upload.vue'
 
 export default {
@@ -247,7 +251,7 @@ export default {
       // typeList: [],
       stockList: [],
       categoryList: [],
-      
+
       tableGoodsList: [],
       tableSelection: [],
     }
@@ -335,7 +339,7 @@ export default {
         this.categoryList = res.data.records;
       })
     },
-    
+
     // 库存字段
     stockFilter(item, type) {
       let STOCK_ORDER_INVOICE = this.stockList.find(o => o.dictCode == 'STOCK_ORDER_INVOICE').dictValue;
@@ -530,4 +534,4 @@ export default {
     width: 100%;
     height: 100%;
   }
-</style>
+</style>

+ 17 - 17
src/views/supply/sales/sales_list.vue

@@ -66,7 +66,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            
+
             <el-col :xs="24" :sm="12" :lg="18" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
@@ -90,11 +90,11 @@
         <div class="table">
           <el-table
             v-loading="listLoading"
-            :data="dataList" 
-            element-loading-text="Loading" 
-            border 
-            fit 
-            highlight-current-row 
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
             stripe
             @selection-change="handleSelectionChange"
             show-summary
@@ -125,7 +125,7 @@
             <el-table-column align="left" label="订单号" prop="orderNo" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.orderType === 'TRADE' ? scope.row.enginOrderNo : scope.row.mainOrderId" />
-                <span>{{scope.row.orderType === 'TRADE' ? scope.row.enginOrderNo : scope.row.mainOrderId}}</span>
+                <span>{{scope.row.orderType === 'TRADE' || scope.row.orderType === 'HMOE' ? scope.row.enginOrderNo : scope.row.mainOrderId}}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip></el-table-column>
@@ -186,10 +186,10 @@
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
-                <el-popconfirm 
-                  style="margin-left: 10px;" 
-                  title="确定弃审吗?" 
-                  @onConfirm="handleAbandon(scope.row.id)" 
+                <el-popconfirm
+                  style="margin-left: 10px;"
+                  title="确定弃审吗?"
+                  @onConfirm="handleAbandon(scope.row.id)"
                   v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
@@ -214,7 +214,7 @@
     </div>
 
     <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
-    
+
     <SalesDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <SalesExamine :listItem="queryItem" v-if="isShowExamine" @backListFormExamine="backList" />
     <SalesReturnForm :listItem="queryItem" v-if="isShowReturnForm" @backListFormDetail="backList" />
@@ -223,11 +223,11 @@
 </template>
 
 <script>
-import { getList, examineJudge, examineBatch, abandonData } from "@/api/supply/sales";
-import SalesDetail from "@/views/supply/sales/components/sales_detail";
-import SalesExamine from "@/views/supply/sales/components/sales_examine";
-import SalesReturnForm from "@/views/supply/sales/components/sales_return_form";
-import ExamineDialog from "@/components/Common/examine-dialog";
+import { abandonData, examineBatch, examineJudge, getList } from '@/api/supply/sales'
+import SalesDetail from '@/views/supply/sales/components/sales_detail'
+import SalesExamine from '@/views/supply/sales/components/sales_examine'
+import SalesReturnForm from '@/views/supply/sales/components/sales_return_form'
+import ExamineDialog from '@/components/Common/examine-dialog'
 
 let that
 export default {