Browse Source

no message

linwenxin 1 năm trước cách đây
mục cha
commit
d23ba028e7

+ 13 - 1
src/api/finance/receivable_list.js

@@ -104,4 +104,16 @@ export function financeOtherReceClose(data) {
     method: 'get',
     params: data
   })
-}
+}
+
+export function financeReceImportDataImport(data) {
+  return handleImport('finance/rece/import/dataImport', data.formdata, data.id || '')
+}
+
+export function financeOtherReceCancelApply(params) {
+  return request({
+    url: '/finance/other/rece/cancelApply',
+    method: 'post',
+    params: params
+  })
+}

+ 42 - 5
src/views/finance/receivable_list.vue

@@ -34,7 +34,9 @@ import {
   getFinanceOtherReceDetail,
   getFinanceOtherReceApply,
   getFinanceOtherReceAbandon,
-  financeOtherReceClose
+  financeOtherReceClose,
+  financeReceImportDataImport,
+  financeOtherReceCancelApply
 } from '@/api/finance/receivable_list'
 import ReceivableListAdd from './components/receivable_list-add'
 import ReceivableListApproval from './components/receivable_list-approval'
@@ -47,7 +49,7 @@ import printPreview from './components/design/preview.vue'
 import { getCompanyList } from '@/api/user'
 import { numToFixed } from '@/filters'
 import { changeNumberMoneyToChinese } from '@/utils/util'
-
+import { downloadFiles } from '@/utils/util'
 export default {
   components: { TemplatePage, Popu, ReceivableListAdd, ReceivableListApproval, ReceivableListDetail, printPreview },
   mixins: [import_mixin, add_callback_mixin],
@@ -102,7 +104,25 @@ export default {
               isRole: this.$checkBtnRole('del', this.$route.meta.roles)
             }
           ]
-        ]
+        ],
+        [
+          [
+            {
+              name: '导入模版',
+              click: () => {
+                downloadFiles('finance/other/rec/download')
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '导入',
+              render: this.importButton(financeReceImportDataImport)
+            }
+          ]
+        ],
       ],
       // 表格属性
       tableAttributes: {
@@ -165,12 +185,29 @@ export default {
                 打印
               </el-button>
             ) : null}
-            {(row.examineStatus == 'WAIT' || row.examineStatus == 'FAIL') &&
-            this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+            {row.examineStatus == 'WAIT' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button type="text" size="mini" onClick={() => this.approvalFn(row.id)}>
                 审批
               </el-button>
             ) : null}
+            {row.examineStatus == 'WAIT' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+              <el-button type="text" size="mini" onClick={() => {
+                this.$confirm('取消提审, 是否继续?', '提示', {
+                  confirmButtonText: '确定',
+                  cancelButtonText: '取消',
+                  type: 'warning'
+                }).then(() => {
+                  financeOtherReceCancelApply({
+                    id: row.id
+                  }).then(_res=>{
+                    this.$message.success('取消成功')
+                    this.$refs.pageRef.refreshList()
+                  })
+                }).catch(() => {});
+              }}>
+                取消提审
+              </el-button>
+            ) : null}
             {row.examineStatus == 'SAVE' ? (
               <el-button type="text" size="mini" onClick={() => this.bringFn(row.id)}>
                 提审

+ 16 - 2
src/views/stock_control/guangFoInventory.vue

@@ -7,12 +7,21 @@
           <el-button size="mini" @click="clearFn">清空</el-button>
           <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
         </template>
+
         <template #search>
           <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="correspondName">
-                  <el-input v-model="searchForm.correspondName" placeholder="请输入经销商名称"></el-input>
+                  <el-select v-model="searchForm.correspondName" clearable filterable placeholder="请选择经销商名称">
+                    <el-option
+                      v-for="item in options"
+                      :key="item.dictCode"
+                      :label="item.dictValue"
+                      :value="item.dictValue">
+                    </el-option>
+                  </el-select>
+                  <!-- <el-input v-model="searchForm.correspondName" placeholder="请输入经销商名称"></el-input> -->
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
@@ -100,6 +109,7 @@
 
 <script>
 import { stockStartAccStock } from '@/api/guangFoInventory'
+import selectData from "@/components/template/selectData.js"
 export default {
   components: {},
   data() {
@@ -116,7 +126,8 @@ export default {
       },
       dataList: [],
       statusList: [],
-      currentStatus: ''
+      currentStatus: '',
+      options:[]
     }
   },
   computed: {
@@ -128,6 +139,9 @@ export default {
   },
   async created() {
     await this.getList({ pageNumber: 1, pageSize: 10 })
+    selectData.STOCK().then(res=>{
+      this.options = res.data
+    })
   },
   methods: {
     // 更改每页数量