YangJian0701 2 ヶ月 前
コミット
dfac260a09

+ 4 - 1
.env.production

@@ -10,6 +10,9 @@ VITE_DROP_CONSOLE = true #去除打印 debugger
 NODE_ENV = 'production'
 VITE_BZD_ERP_APP_TITLE = 'ERP宝智达'
 VITE_APP_BASE_API = '/api'
-VITE_SERVE = 'https://erp.baozhida.cn'
+VITE_SERVE = 'https://erp.baozhida.cn' #发布生产环境时打开
+# VITE_SERVE = 'https://erptest.baozhida.cn' #发布测试环境时打开
+
+
 VITE_BZD_ERPOSS_APP_API = 'https://erposs.baozhida.cn'
 

BIN
ERP.rar


+ 1 - 1
src/api/index.ts

@@ -10,10 +10,10 @@ type LoadingType = {
   close?: () => void
 }
 let loadingInstance: LoadingType = {}
+// console.log('环境',process.env.NODE_ENV,import.meta.env.VITE_SERVE)
 const config = {
   // 默认地址请求地址,可在 .env.*** 文件中修改
 //   baseURL: process.env.NODE_ENV ?(import.meta.env.VITE_BZD_ERP_APP_API as string) : '' ,
-  // baseURL:'https://erptest.baozhida.cn/api',//测试
     
   baseURL:import.meta.env.VITE_SERVE + import.meta.env.VITE_APP_BASE_API,
 

+ 7 - 0
src/api/storehouse/index.ts

@@ -1,6 +1,13 @@
 import $http from '../index'
 
 
+
+
+export const StockinExcel = (params: any) => $http.post('/storage/StockIn/List_Product_Excel', params)
+
+export const StockOutExcel = (params: any) => $http.post('/storage/StockOut/List_Product_Excel', params)
+
+
 /**
  * 提成项目
  */

+ 1 - 3
src/views/contractReview/contractReviewList.vue

@@ -78,9 +78,7 @@ const data = reactive({
         User_tokey: globalStore.GET_User_tokey,
         T_name: '',
         T_submit: '',
-        T_audit: '',
-        page: 1,
-        page_z: 10,
+        T_audit: ''
     },
     fromData:{},
 })

+ 2 - 0
src/views/storehouse/ProductionList.vue

@@ -155,6 +155,8 @@ const onclickSort = async (row:any)=>{
        }
     }).catch(() => {})
 }
+const inputData = ref()
+
 onMounted(() => {
   getProductClassList()
 })

+ 1 - 1
src/views/storehouse/inventory/InStorageSn.vue

@@ -18,7 +18,6 @@ const SNDataMap = new Map<number, FormSnType[]>()
 const tableSnData = ref<FormSnType[]>([])
 const ruleSnFormRef = ref<FormInstance>()
 const drawerSnRef = ref<InstanceType<typeof Drawer> | null>(null)
-
 const snColumns = [
   { type: 'index', label: '序号', width: 80, align: 'center ' },
   { label: 'SN', prop: 'sn', align: 'center ' },
@@ -161,6 +160,7 @@ defineExpose({
           <el-button type="success" @click="drawer = true">导入xlsx</el-button>
         </div>
       </template>
+      <div>数量:{{ tableSnData.length }}</div>
       <el-table
         ref="snTable"
         :data="tableSnData"

+ 29 - 5
src/views/storehouse/inventory/inStorageDetails.vue

@@ -5,7 +5,7 @@ import { View } from '@element-plus/icons-vue'
 import { ref, reactive } from 'vue'
 import TableBase from '@/components/TableBase/index.vue'
 import type { ColumnProps } from '@/components/TableBase/interface/index'
-import { StockIn_ListProducts } from '@/api/storehouse/index'
+import { StockIn_ListProducts,StockinExcel } from '@/api/storehouse/index'
 import { depotHooks } from '@/hooks/useDepot'
 
 const router = useRouter()
@@ -48,9 +48,10 @@ const initParam = reactive({
     T_end_date: '',
     T_start_date: '',
     T_depot_id: '',
+    T_product_name: '',
+    T_product_model: '',
     T_name: '',
 })
-
 const searchHandle = () => {
     initParam.T_end_date = T_date.value ? T_date.value[1] : ''
     initParam.T_start_date = T_date.value ? T_date.value[0] : ''
@@ -58,6 +59,17 @@ const searchHandle = () => {
 }
 // 拿到仓库列表
 const { options } = depotHooks()
+
+
+/**
+ * Excel
+ */
+ const onclickExcel = async ()=>{
+    const result:any = await StockinExcel(initParam)
+    console.log('导出',result)
+
+    if (result.Code === 200)window.open(result.Data)
+}
 </script>
 
 <template>
@@ -67,17 +79,25 @@ const { options } = depotHooks()
             <template #table-header>
                 <div class="input-suffix">
                     <el-row :gutter="20" style="margin-bottom: 0">
-                        <el-col :xl="6" :lg="6" :md="6" style="display: flex">
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
                             <span class="inline-flex items-center">关键字:</span>
                             <el-input v-model="initParam.T_name" placeholder="入库单号,备注搜索" />
                         </el-col>
-                        <el-col :xl="6" :lg="6" :md="6" style="display: flex">
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
                             <span class="inline-flex items-center">入库日期:</span>
                             <el-date-picker v-model="T_date" type="daterange" range-separator="~"
                                 start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD"
                                 value-format="YYYY-MM-DD" />
                         </el-col>
-                        <el-col :xl="6" :lg="6" :md="6" style="display: flex">
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                            <span class="inline-flex items-center">产品名称:</span>
+                            <el-input v-model="initParam.T_product_name" placeholder="产品名称" />
+                        </el-col>
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                            <span class="inline-flex items-center">产品型号:</span>
+                            <el-input v-model="initParam.T_product_model" placeholder="产品型号" />
+                        </el-col>
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
                             <span class="inline-flex items-center">仓库:</span>
                             <el-select v-model="initParam.T_depot_id" clearable placeholder="请选择仓库~">
                                 <el-option v-for="item in options" :key="item.Id" :label="item.T_name"
@@ -85,7 +105,11 @@ const { options } = depotHooks()
                             </el-select>
                             <el-button type="primary" @click="searchHandle">搜索</el-button>
                         </el-col>
+                        <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                            <el-button type="primary" icon="Download" @click="onclickExcel">导出</el-button>
+                        </el-col>
                     </el-row>
+                    
                 </div>
             </template>
             <template #T_product_relation_sn="{ row }">

+ 1 - 0
src/views/storehouse/outStock/modules/InStorageEditSn.vue

@@ -163,6 +163,7 @@ defineExpose({
           <el-button type="success" @click="drawer = true">导入xlsx</el-button>
         </div>
       </template>
+      <div>数量:{{ tableSnData.length }}</div>
       <el-table
         ref="snTable"
         :data="tableSnData"

+ 28 - 5
src/views/storehouse/outStock/outStockDetails.vue

@@ -9,7 +9,7 @@ import { validate_T_phone } from '@/views/account/users/components/relus'
 import { ref, reactive, nextTick } from 'vue'
 import TableBase from '@/components/TableBase/index.vue'
 import type { ColumnProps } from '@/components/TableBase/interface/index'
-import { Storehouse_StockOut_ListProduct, Storehouse_StockOut_Edit } from '@/api/storehouse/index'
+import { Storehouse_StockOut_ListProduct, Storehouse_StockOut_Edit,StockOutExcel } from '@/api/storehouse/index'
 import { depotHooks, delivery_type } from '@/hooks/useDepot'
 
 const router = useRouter()
@@ -70,6 +70,8 @@ const initParam = reactive({
   T_end_date: '',
   T_start_date: '',
   T_depot_id: '',
+  T_product_name: '',
+    T_product_model: '',
   T_name: '',
 })
 const searchHandle = () => {
@@ -111,6 +113,16 @@ const resetForm = (formEl: FormInstance | undefined) => {
 }
 // 拿到仓库列表
 const { options } = depotHooks()
+
+/**
+ * Excel
+ */
+ const onclickExcel = async ()=>{
+    const result:any = await StockOutExcel(initParam)
+    console.log('导出',result)
+
+    if (result.Code === 200)window.open(result.Data)
+}
 </script>
 
 <template>
@@ -119,11 +131,11 @@ const { options } = depotHooks()
       <template #table-header>
         <div class="input-suffix">
           <el-row :gutter="20" style="margin-bottom: 0">
-            <el-col :xl="6" :lg="6" :md="6" style="display: flex">
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
                 <span class="inline-flex items-center">关键字:</span>
                 <el-input v-model="initParam.T_name" placeholder="出库单号,关联项目搜索" />
-            </el-col>
-            <el-col :xl="6" :lg="9" :md="11" style="display: flex">
+            </el-col> 
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
               <span class="inline-flex items-center">出库日期:</span>
               <el-date-picker
                 v-model="T_date"
@@ -135,13 +147,24 @@ const { options } = depotHooks()
                 value-format="YYYY-MM-DD"
               />
             </el-col>
-            <el-col :xl="6" :lg="7" :md="9" style="display: flex">
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                <span class="inline-flex items-center">产品名称:</span>
+                <el-input v-model="initParam.T_product_name" placeholder="产品名称" />
+            </el-col>
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                <span class="inline-flex items-center">产品型号:</span>
+                <el-input v-model="initParam.T_product_model" placeholder="产品型号" />
+            </el-col>
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
               <span class="inline-flex items-center">仓库:</span>
               <el-select v-model="initParam.T_depot_id" clearable placeholder="请选择仓库~">
                 <el-option v-for="item in options" :key="item.Id" :label="item.T_name" :value="item.Id" />
               </el-select>
               <el-button type="primary" @click="searchHandle">搜索</el-button>
             </el-col>
+            <el-col :xl="4" :lg="4" :md="4" style="display: flex">
+                <el-button type="primary" icon="Download" @click="onclickExcel">导出</el-button>
+            </el-col>
           </el-row>
         </div>
       </template>