From c7d99f5e11c4cf0667f67b8170e1c585db2e2016 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期六, 08 二月 2025 15:34:15 +0800
Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1

---
 admin/src/views/contract/components/pendingBills.vue  |    4 
 admin/src/views/stock/components/inventoryDetails.vue |   34 ++++-
 admin/public/template/material.xlsx                   |    0 
 admin/src/views/project/components/houseDetails.vue   |  135 +++++++++++----------
 admin/src/views/finance/collectionSettings.vue        |   58 ++++++---
 admin/src/api/ywMaterial.js                           |   13 ++
 admin/src/views/operation/components/deviceEdit.vue   |   18 +-
 admin/src/views/stock/assetList.vue                   |   48 +++++++
 admin/src/api/ywStocktaking.js                        |    8 +
 admin/src/views/stock/asset.vue                       |    2 
 admin/src/views/stock/query.vue                       |    7 +
 admin/src/api/store/index.js                          |    3 
 12 files changed, 224 insertions(+), 106 deletions(-)

diff --git a/admin/public/template/material.xlsx b/admin/public/template/material.xlsx
new file mode 100644
index 0000000..2c7b158
--- /dev/null
+++ b/admin/public/template/material.xlsx
Binary files differ
diff --git a/admin/src/api/store/index.js b/admin/src/api/store/index.js
index 03aac7a..09260a5 100644
--- a/admin/src/api/store/index.js
+++ b/admin/src/api/store/index.js
@@ -41,6 +41,7 @@
 }
 export function ywOutinboundRecordEx (data) {
   return request.post('/visitsAdmin/cloudService/business/ywOutinboundRecord/exportExcel', data, {
-    trim: true
+    trim: true,
+    download: true
   })
 }
diff --git a/admin/src/api/ywMaterial.js b/admin/src/api/ywMaterial.js
index e7da119..92e8655 100644
--- a/admin/src/api/ywMaterial.js
+++ b/admin/src/api/ywMaterial.js
@@ -26,3 +26,16 @@
 export function deleteById (id) {
   return request.get(`/visitsAdmin/cloudService/business/ywMaterial/delete/${id}`)
 }
+
+// 瀵煎嚭Excel
+export function exportExcel (data) {
+  return request.post('/visitsAdmin/cloudService/business/ywMaterial/exportExcel', data, {
+    trim: true,
+    download: true
+  })
+}
+
+// 瀵煎叆妯℃澘
+export function importMaterialBatch (data) {
+  return request.post('/visitsAdmin/cloudService/business/ywMaterial/importMaterialBatch', data)
+}
diff --git a/admin/src/api/ywStocktaking.js b/admin/src/api/ywStocktaking.js
index 00c5235..8eb6fb9 100644
--- a/admin/src/api/ywStocktaking.js
+++ b/admin/src/api/ywStocktaking.js
@@ -37,6 +37,14 @@
   return request.get(`/visitsAdmin/cloudService/business/ywStocktaking/finishById?id=${id}`)
 }
 
+// 瀵煎嚭Excel
+export function exportExcel (data) {
+  return request.post('/visitsAdmin/cloudService/business/ywStocktakingRecord/exportExcel', data, {
+    trim: true,
+    download: true
+  })
+}
+
 // 鏌ヨ
 export function ywStocktakingRecordPage (data) {
   return request.post('/visitsAdmin/cloudService/business/ywStocktakingRecord/page', data, {
diff --git a/admin/src/views/contract/components/pendingBills.vue b/admin/src/views/contract/components/pendingBills.vue
index a068377..14b3358 100644
--- a/admin/src/views/contract/components/pendingBills.vue
+++ b/admin/src/views/contract/components/pendingBills.vue
@@ -34,7 +34,7 @@
                     border
                     style="width: 100%">
                     <el-table-column
-                        prop="date"
+                        prop="code"
                         label="璐﹀崟缂栧彿">
                     </el-table-column>
                     <el-table-column
@@ -75,7 +75,7 @@
                         </template>
                     </el-table-column>
                     <el-table-column
-                        prop="actPayDate"
+                        prop="btDate"
                         label="搴旀敹/浠樻棩鏈�">
                     </el-table-column>
                 </el-table>
diff --git a/admin/src/views/finance/collectionSettings.vue b/admin/src/views/finance/collectionSettings.vue
index 9a1ec04..fce513d 100644
--- a/admin/src/views/finance/collectionSettings.vue
+++ b/admin/src/views/finance/collectionSettings.vue
@@ -20,28 +20,41 @@
                             <el-tooltip style="margin-right: 10px; margin-top: 10px; flex-shrink: 0;" effect="dark" content="鍖呭惈绉熻祦璐广�佺墿涓氳垂銆佺璧佹娂閲戙�佺墿涓氭娂閲�" placement="bottom-start">
                                 <i class="el-icon-question"></i>
                             </el-tooltip>
-                            <el-upload
-                                style="flex: 1;"
-                                class="upload-demo"
-                                :action="uploadImgUrl"
-                                :data="uploadData"
-                                :on-success="uploadAvatarSuccess"
-                                :on-remove="handleRemove"
-                                :file-list="form.leaseTemp">
-                                <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
-                            </el-upload>
+                            <div style="display: flex; align-items: center;">
+                                <el-button type="text" v-for="(item, index) in form.leaseTemp" :key="index" style="margin-right: 10px;" @click="openFile(item.url)">{{item.name}}</el-button>
+                                <el-upload
+                                    class="upload-demo"
+                                    :action="uploadImgUrl"
+                                    :data="uploadData"
+                                    :on-success="uploadAvatarSuccess"
+                                    :on-remove="handleRemove">
+                                    <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                                </el-upload>
+                            </div>
+<!--                            <el-upload-->
+<!--                                style="flex: 1;"-->
+<!--                                class="upload-demo"-->
+<!--                                :action="uploadImgUrl"-->
+<!--                                :data="uploadData"-->
+<!--                                :on-success="uploadAvatarSuccess"-->
+<!--                                :on-remove="handleRemove"-->
+<!--                                :file-list="form.leaseTemp">-->
+<!--                                <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>-->
+<!--                            </el-upload>-->
                         </div>
                     </el-form-item>
                     <el-form-item label="鍏朵粬閫氱煡鍗曟ā鏉�">
-                        <el-upload
-                            class="upload-demo"
-                            :action="uploadImgUrl"
-                            :data="uploadData"
-                            :on-success="uploadAvatarSuccess1"
-                            :on-remove="handleRemove1"
-                            :file-list="form.otherTemp">
-                            <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
-                        </el-upload>
+                        <div style="display: flex; align-items: center;">
+                            <el-button type="text" v-for="(item, index) in form.otherTemp" :key="index" style="margin-right: 10px;" @click="openFile(item.url)">{{item.name}}</el-button>
+                            <el-upload
+                                class="upload-demo"
+                                :action="uploadImgUrl"
+                                :data="uploadData"
+                                :on-success="uploadAvatarSuccess1"
+                                :on-remove="handleRemove1">
+                                <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                            </el-upload>
+                        </div>
                     </el-form-item>
                     <el-form-item>
                         <el-button type="primary" @click="submit" :disabled="loading" :loading="loading">淇濆瓨</el-button>
@@ -93,6 +106,9 @@
           this.loading = false
         })
       },
+      openFile(url) {
+        window.open(url)
+      },
       handleRemove(e) {
         this.form.leaseTemp = []
       },
@@ -112,8 +128,8 @@
             .then(res => {
               this.form.smsTemp = res.smsTemp
               this.form.emailTemp = res.emailTemp
-              this.form.leaseTemp = [{ url: res.leaseTemp.url, name: res.leaseTemp.title }]
-              this.form.otherTemp = [{ url: res.otherTemp.url, name: res.otherTemp.title }]
+              this.form.leaseTemp = [{ url: res.leaseTemp.url, ...res.leaseTemp, name: res.leaseTemp.title }]
+              this.form.otherTemp = [{ url: res.otherTemp.url, ...res.otherTemp, name: res.otherTemp.title }]
             })
       }
     }
diff --git a/admin/src/views/operation/components/deviceEdit.vue b/admin/src/views/operation/components/deviceEdit.vue
index 1abaeb7..f727966 100644
--- a/admin/src/views/operation/components/deviceEdit.vue
+++ b/admin/src/views/operation/components/deviceEdit.vue
@@ -325,13 +325,17 @@
       detailById(id).then(res => {
         this.param = res
         this.param.rooms = [res.projectId, res.buildingId, res.floorId, res.roomId]
-        this.param.multifileList = res.multifileList.map(item => {
-          return {
-            ...item,
-            createUserName: item.userName,
-            createTime: item.createDate
-          }
-        })
+        console.log(this.param.rooms)
+        if (res.multifileList && res.multifileList.length > 0) {
+          this.param.multifileList = res.multifileList.map(item => {
+            return {
+              ...item,
+              createUserName: item.userName,
+              createTime: item.createDate
+            }
+          })
+        }
+        this.changeProject()
         this.getHouseTree()
         const cateId = this.param.cateId || ''
         setTimeout(() => {
diff --git a/admin/src/views/project/components/houseDetails.vue b/admin/src/views/project/components/houseDetails.vue
index 98310e9..634af23 100644
--- a/admin/src/views/project/components/houseDetails.vue
+++ b/admin/src/views/project/components/houseDetails.vue
@@ -121,10 +121,6 @@
                                             label="绛捐鏃�">
                                         </el-table-column>
                                         <el-table-column
-                                            prop="address"
-                                            label="鍚堝悓鏉ユ簮">
-                                        </el-table-column>
-                                        <el-table-column
                                             label="鍚堝悓鐘舵��">
                                             <template slot-scope="{row}">
                                                 <span class="primaryColor" v-if="row.status === 0">寰呮墽琛�</span>
@@ -254,10 +250,14 @@
                         <div class="xm">
                             <div class="xm_chat">
                                 <el-card class="xm_chat_row">
-                                    <div id="chat1"></div>
+                                    <div class="xm_chat_row_info">
+                                        <span>鎬昏</span>
+                                        <span>{{amount}}</span>
+                                    </div>
+                                    <div id="chat1" v-if="activeName === 'third'"></div>
                                 </el-card>
                                 <el-card class="xm_chat_row">
-                                    <div id="chat2"></div>
+                                    <div id="chat2" v-if="activeName === 'third'"></div>
                                 </el-card>
                             </div>
                             <el-card style="margin-top: 20px;">
@@ -387,7 +387,8 @@
         categaryList: [],
         deviceList: [],
         showDetail: false,
-        showEdit1: false
+        showEdit1: false,
+        amount: 0
       }
     },
     methods: {
@@ -408,6 +409,7 @@
           this.$refs.EditRef.param.rooms = [this.info.projectId, this.info.buildingId, this.info.floor, this.info.id]
           this.$refs.EditRef.isShowModal = true
           this.$refs.EditRef.changeProject()
+          this.$refs.EditRef.getHouseVal([this.info.projectId, this.info.buildingId, this.info.floor, this.info.id])
         })
       },
       handleDetail(row) {
@@ -435,6 +437,7 @@
                   { value: res.exceptionAmount || 0, name: '寮傚父' },
                   { value: res.errAmount || 0, name: '鎶ュ簾' }
                 ]
+                this.amount = res.amount
                 this.reand()
               })
             })
@@ -582,13 +585,7 @@
             {
               name: '璁惧鐘舵��',
               type: 'pie',
-              radius: ['40%', '80%'],
-              label: {
-                show: true,
-                position: 'center',
-                fontWeight: 'bold',
-                fontSize: 22
-              },
+              radius: ['50%', '80%'],
               data: this.deviceList
             }
           ]
@@ -599,51 +596,24 @@
         var chartDom = document.getElementById('chat2');
         var myChart = echarts.init(chartDom);
         var option;
-        const rawData = [
-          [100, 302, 301, 334, 390, 330, 320],
-          [320, 132, 101, 134, 90, 230, 210],
-          [220, 182, 191, 234, 290, 330, 310],
-          [150, 212, 201, 154, 190, 330, 410],
-          [820, 832, 901, 934, 1290, 1330, 1320]
-        ];
-        const totalData = [];
-        for (let i = 0; i < rawData[0].length; ++i) {
-          let sum = 0;
-          for (let j = 0; j < rawData.length; ++j) {
-            sum += rawData[j][i];
-          }
-          totalData.push(sum);
-        }
-        const series = [
-          'Direct',
-          'Mail Ad',
-          'Affiliate Ad',
-          'Video Ad',
-          'Search Engine'
-        ].map((name, sid) => {
-          return {
-            name,
-            type: 'bar',
-            stack: 'total',
-            barWidth: '60%',
-            data: rawData[sid].map((d, did) =>
-              totalData[did] <= 0 ? 0 : d / totalData[did]
-            )
-          };
-        });
-        let seriesArr = this.categaryList.map(item => {
-          return {
-            name: item.cateName,
-            type: 'bar',
-            stack: 'total',
-            barWidth: '60%',
-            data: item.ywDeviceCateDataVOList.map((child) =>
-              child.deviceAmount
-            )
-          }
+        let seriesArr = []
+        this.categaryList.forEach((one, index) => {
+          one.ywDeviceCateDataVOList.forEach(two => {
+            let data = []
+            this.categaryList.forEach(item => {
+              data.push(0)
+            })
+            data[index] = two.deviceAmount
+            seriesArr.push({
+              name: two.cateName,
+              type: 'bar',
+              barGap:-1,
+              stack: one.cateName,
+              data
+            })
+          })
         })
         let xAxisData = this.categaryList.map(item => item.cateName)
-        console.log(series)
         console.log(seriesArr)
         console.log(xAxisData)
         option = {
@@ -660,15 +630,30 @@
             trigger: 'axis',
             axisPointer: {
               type: 'shadow'
+            },
+            formatter: params => {
+              var res = `${params[0].name} <br/>`
+              for (const item of params) {
+                if (item.value !== 0) {
+                  res += `<span style="background: ${item.color}; height:10px; width: 10px; border-radius: 50%;display: inline-block;margin-right:10px;"></span> ${item.seriesName} 锛�${item.value}<br/>`
+                }
+              }
+              return res
             }
           },
-          yAxis: {
-            type: 'value'
-          },
-          xAxis: {
-            type: 'category',
-            data: xAxisData
-          },
+          xAxis: [
+            {
+              type: 'category',
+              position: 'bottom',
+              data: xAxisData
+            }
+          ],
+          yAxis: [
+            {
+              type: 'value',
+              data: Array.from({ length: 100 }, (_, i) => i + 1)
+            }
+          ],
           series: seriesArr
         };
 
@@ -870,6 +855,28 @@
                     .xm_chat_row {
                         width: 49%;
                         height: 300px;
+                        position: relative;
+                        .xm_chat_row_info {
+                            position: absolute;
+                            top: 50%;
+                            left: 50%;
+                            transform: translate(-50%, -50%);
+                            display: flex;
+                            flex-direction: column;
+                            align-items: center;
+                            justify-content: center;
+                            span {
+                                &:nth-child(1) {
+                                    font-size: 20px;
+                                    color: #222222;
+                                }
+                                &:nth-child(2) {
+                                    font-size: 28px;
+                                    color: #222222;
+                                    font-weight: bold;
+                                }
+                            }
+                        }
                         #chat1 {
                             width: 100%;
                             height: 260px;
diff --git a/admin/src/views/stock/asset.vue b/admin/src/views/stock/asset.vue
index 8f78846..787f8af 100644
--- a/admin/src/views/stock/asset.vue
+++ b/admin/src/views/stock/asset.vue
@@ -111,7 +111,7 @@
     },
     changeStatus(e, row) {
       updateStatusById({ id: row.id, status: e })
-        .then(res => {
+        .finally(() => {
           this.getList()
         })
     },
diff --git a/admin/src/views/stock/assetList.vue b/admin/src/views/stock/assetList.vue
index 90214cc..02bbe42 100644
--- a/admin/src/views/stock/assetList.vue
+++ b/admin/src/views/stock/assetList.vue
@@ -3,8 +3,16 @@
     <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" />
     <div class="mt20">
       <el-button type="primary" @click="$refs.newMaterial.open('鏂板缓鐗╂枡')">娣诲姞</el-button>
-      <el-button>瀵煎嚭</el-button>
-      <el-button>瀵煎叆</el-button>
+      <el-button @click="exportExcel">瀵煎嚭</el-button>
+      <el-popover
+        placement="right"
+        trigger="click">
+        <div style="display: flex; align-items: center; justify-content: center;">
+          <el-button type="primary" @click="$refs.uploadFile.click()">瀵煎叆妯℃澘</el-button>
+          <el-button type="text" @click="exportTemplate">鐐瑰嚮涓嬭浇妯$増.EXCEL</el-button>
+        </div>
+        <el-button style="margin-left: 10px;" slot="reference">瀵煎叆</el-button>
+      </el-popover>
     </div>
     <el-table v-loading="loading" :data="list" stripe>
       <el-table-column prop="code" label="鐗╂枡缂栫爜" min-width="100" show-overflow-tooltip />
@@ -38,6 +46,7 @@
       <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
     </div>
     <newMaterial ref="newMaterial" @success="getList" />
+    <input type="file" ref="uploadFile" @change="importTemplate" accept=".xlsx" style="position: fixed; top: -100px;" />
   </div>
 </template>
 
@@ -48,7 +57,7 @@
 import dayjs from 'dayjs'
 import duration from 'dayjs/plugin/duration'
 dayjs.extend(duration)
-import { fetchList, updateStatus, deleteById } from '@/api/ywMaterial'
+import { fetchList, updateStatus, deleteById, exportExcel, importMaterialBatch } from '@/api/ywMaterial'
 export default {
   components: {
     Pagination,
@@ -87,6 +96,39 @@
     this.getList()
   },
   methods: {
+    // 瀵煎嚭妯℃澘
+    exportTemplate () {
+      window.open('/template/material.xlsx')
+    },
+    // 瀵煎叆妯℃澘
+    importTemplate(e) {
+      const FormDate = new FormData()
+      FormDate.append('file', e.target.files[0])
+      importMaterialBatch(FormDate)
+        .then(res => {
+          this.getList()
+        })
+        .finally(() => {
+          this.$refs.uploadFile.value = null
+        })
+    },
+    exportExcel () {
+      this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+        .then(() => {
+          exportExcel({
+            page: this.pagination.page,
+            capacity: 1000000,
+            model: this.filters
+          })
+            .then(response => {
+              this.download(response)
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+        })
+        .catch(() => {})
+    },
     getList(page) {
       const { pagination, filters } = this
       this.loading = true
diff --git a/admin/src/views/stock/components/inventoryDetails.vue b/admin/src/views/stock/components/inventoryDetails.vue
index c5b03c4..b5e7a9b 100644
--- a/admin/src/views/stock/components/inventoryDetails.vue
+++ b/admin/src/views/stock/components/inventoryDetails.vue
@@ -39,7 +39,7 @@
                         <el-input v-model="form.materialCode" style="width: 200px; margin-right: 10px;" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�/缂栫爜"></el-input>
                         <el-select v-model="form.status" style="width: 150px; margin-right: 10px;" placeholder="鐩樼偣鐘舵��">
                             <el-option label="宸茬洏" :value="1"></el-option>
-                            <el-option label="鏈洏" :value="0"></el-option>
+                            <el-option label="鏈洏" :value="2"></el-option>
                         </el-select>
                         <el-select v-model="form.type" style="width: 150px; margin-right: 10px;" placeholder="鐩樼偣缁撴灉">
                             <el-option label="璐﹀疄鐩哥" :value="0"></el-option>
@@ -48,7 +48,7 @@
                         </el-select>
                         <el-button type="primary" @click="getList">鏌ヨ</el-button>
                         <el-button @click="clear">娓呯┖</el-button>
-                        <el-button>瀵煎嚭</el-button>
+                        <el-button @click="exportExcel">瀵煎嚭</el-button>
                     </div>
                     <div class="list_search_right">
                         <span>宸茬洏:{{info.finishAmount || 0}}</span>
@@ -60,8 +60,8 @@
                 </div>
                 <div style="width: 100%; margin: 20px 0;">
                     <el-table :data="list" stripe>
-                        <el-table-column prop="materialCode" label="璧勪骇缂栫爜" show-overflow-tooltip />
-                        <el-table-column prop="materialName" label="璧勪骇鍚嶇О" show-overflow-tooltip />
+                        <el-table-column prop="materialCode" label="鐗╂枡缂栫爜" show-overflow-tooltip />
+                        <el-table-column prop="materialName" label="鐗╂枡鍚嶇О" show-overflow-tooltip />
                         <el-table-column prop="materialQrcode" label="鏉$爜" show-overflow-tooltip />
                         <el-table-column prop="materialBrand" label="鍝佺墝" show-overflow-tooltip />
                         <el-table-column prop="materialAttr" label="瑙勬牸鍨嬪彿" show-overflow-tooltip />
@@ -70,8 +70,8 @@
                         <el-table-column prop="stock" label="璐﹂潰鏁伴噺" show-overflow-tooltip />
                         <el-table-column label="鐩樼偣鏁伴噺" show-overflow-tooltip>
                             <template slot-scope="{row}">
-                                <span style="color: red;" v-if="row.type === 1">{{row.actStock}}</span>
-                                <span style="color: green;" v-else-if="row.type === 2">{{row.actStock}}</span>
+                                <span style="color: green;" v-if="row.type === 1">{{row.actStock}}</span>
+                                <span style="color: red;" v-else-if="row.type === 2">{{row.actStock}}</span>
                                 <span v-else>{{row.actStock}}</span>
                             </template>
                         </el-table-column>
@@ -97,7 +97,7 @@
 <script>
   import GlobalWindow from '@/components/common/GlobalWindow'
   import BaseOpera from '@/components/base/BaseOpera'
-  import { ywStocktakingRecordPage, getById } from '@/api/ywStocktaking'
+  import { ywStocktakingRecordPage, getById, exportExcel } from '@/api/ywStocktaking'
   export default {
     name: "inventoryDetails",
     components: {
@@ -120,6 +120,26 @@
       }
     },
     methods: {
+      exportExcel () {
+        this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+          .then(() => {
+            exportExcel({
+              page: this.page,
+              capacity: 1000000,
+              model: {
+                ...this.form,
+                stocktakingId: this.id
+              }
+            })
+              .then(response => {
+                this.download(response)
+              })
+              .catch(e => {
+                this.$tip.apiFailed(e)
+              })
+          })
+          .catch(() => {})
+      },
       handleSizeChange(size) {
         this.pageSize = size
         this.getList()
diff --git a/admin/src/views/stock/query.vue b/admin/src/views/stock/query.vue
index d5d750f..d36de1e 100644
--- a/admin/src/views/stock/query.vue
+++ b/admin/src/views/stock/query.vue
@@ -26,6 +26,7 @@
 import duration from 'dayjs/plugin/duration'
 dayjs.extend(duration)
 import { ywStockPage,ywStockPageEx  } from '@/api/store/index'
+import { fetchList as getStoreList } from '@/api/ywWarehouse'
 export default {
   components: {
     Pagination,
@@ -67,8 +68,14 @@
   },
   created() {
     this.getList()
+    this.initData()
   },
   methods: {
+    initData() {
+      getStoreList({ capacity: 9999, page: 1, model: {} }).then(res => {
+        this.queryFormConfig.formItems[0].options = res.records || []
+      })
+    },
     getList(page) {
       const { pagination, filters } = this
       this.loading = true

--
Gitblit v1.9.3