浏览代码

2023-3-20

codeMan 2 年之前
父节点
当前提交
8c6c11773b

+ 4 - 0
src/HDrpManagement/orderManage/details/export_excel.vue

@@ -5,6 +5,7 @@
 </template>
 
 <script>
+import { log } from '@antv/g2plot/lib/utils'
 export default {
   props:['tablecols','param','excelTitle','total','specialKey'],
   data () {
@@ -33,6 +34,7 @@ export default {
       }
 
       let table = JSON.parse(JSON.stringify(this.tablecols))
+      console.log(table);
       table.forEach((e,index) => {
         // 由于表格数据结构问题这里需要判断一下
         if (e.title === '省市县') {
@@ -58,6 +60,8 @@ export default {
           res.data.forEach(e => {
             e.model = e.model + '/' + e.spec
           })
+        } else if (e.title === '小计') {
+          e.deliverydate = this.tool.formatAmount(e.price * e.qty)
         }
       });
       let hd = table.map(e=>{

+ 5 - 0
src/HDrpManagement/recvoucher/index.vue

@@ -20,6 +20,11 @@
         <el-select style="margin-right: 24px !important;" class="inline-16" @change="selectChange" v-model="selectParam.status" placeholder="请选择状态" size="small" clearable>
           <el-option v-for="(item,index) in statusData" :key="index" :value="item.value" :label="item.value"></el-option>
         </el-select>
+        <label class="search__label " style="margin: auto;width: 70px;">核销状态:</label>
+        <el-select style="margin-right: 24px !important;" class="inline-16" @change="selectChange" v-model="selectParam.iswriteoffamount " placeholder="请选择核销状态" size="small" clearable>
+          <el-option value="已核销" label="已核销"></el-option>
+          <el-option value="未核销" label="未核销"></el-option>
+        </el-select>
         <label class="search__label" style="margin: auto;width: 65px;">单据日期:</label>
         <el-date-picker
             style="margin-right: 24px !important;"

+ 15 - 9
src/HManagement/archvies_mag/modules/delete.vue

@@ -3,6 +3,7 @@
 </template>
 
 <script>
+import { Loading } from 'element-ui';
 export default {
   props:['checklist'],
   data () {
@@ -18,6 +19,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
+        Loading.service({ fullscreen: true ,text:'删除中...'});
         this.checklist.forEach(e => {
           this.deleteFiles(e.attachmentid)
         });
@@ -38,18 +40,22 @@ export default {
         }
       }
       const res = await this.$api.requested(param)
-      this.checklist.length === this.filecount?this.$emit('onSuccess'):''
+      if(this.checklist.length === this.filecount) {
+        this.$emit('onSuccess')
+        Loading.service().close()
+        this.tool.showMessage(res,() => {})
+      }
     }
   },
   watch:{
-    filecount (val) {
-      if (this.checklist.length === val) {
-        this.$message({
-          message:`成功,共删除${this.checklist.length}个文件`,
-          type:'success'
-        })
-      }
-    }
+    // filecount (val) {
+    //   if (this.checklist.length === val) {
+    //     this.$message({
+    //       message:`成功,共删除${this.checklist.length}个文件`,
+    //       type:'success'
+    //     })
+    //   }
+    // }
   }
 }
 

+ 1 - 1
src/SDrpManagement/Products/index.vue

@@ -38,7 +38,7 @@ export default {
     selectClick (callback) {
       this.$refs['list'].params.content.pageNumber = 1
       this.$refs['list'].params.content.brandids = this.$refs['class'].brand_act?[this.$refs['class'].brand_act]:[]
-      this.$refs['list'].params.content.tradefield = this.$refs['class'].field_act
+      // this.$refs['list'].params.content.tradefield = this.$refs['class'].field_act
       this.$refs['list'].listData()
     },
     onClassChange (n) {

+ 24 - 7
src/SDrpManagement/toolBorrowing/detail/tabs/toolList.vue

@@ -15,6 +15,7 @@
         idName="sa_orderitemsid"
         type="del"
     ></uploadAllData>
+    <excel style="margin:0 0 10px 10px" :tablecols="columnTitle" :param="param" :total="total" :excelTitle="excelTitle"></excel>
     <el-table
       ref="multipleTable"
       :data="tableData"
@@ -36,21 +37,24 @@
       </el-table-column>
       <el-table-column
         label="型号"
-        width="150">
+        width="150"
+        prop="model">
         <template slot-scope="scope">
           <p><span>{{scope.row.model}}</span></p>
         </template>
       </el-table-column>
       <el-table-column
           label="规格"
-          width="150">
+          width="150"
+        prop="spec">
         <template slot-scope="scope">
           <p><span>{{scope.row.spec}}</span></p>
         </template>
       </el-table-column>
       <el-table-column
         label="数量"
-        width="180">
+        width="180"
+        prop="qty">
         <template slot-scope="scope">
           <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="type === 'edit' && !data.sa_contractid" size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="rowChange(scope.row,scope.$index)"></el-input-number>
           <span v-else>{{scope.row.qty}}</span>
@@ -98,7 +102,8 @@
       </el-table-column>
       <el-table-column
         label="回复交期"
-        width="200">
+        width="200"
+        prop="deliverydate">
         <template slot="header" slot-scope="scope">
           <div>
             <el-date-picker
@@ -152,14 +157,16 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="小计">
+        label="小计"
+        prop="deliverydate">
         <template slot-scope="scope">
           <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.price * scope.row.qty,2)}}</p>
         </template>
       </el-table-column>
       <el-table-column
         label="备注"
-        width="300">
+        width="300"
+        prop="remarks">
         <template slot-scope="scope">
           <el-input v-if="type === 'edit'" v-model="scope.row.remarks" placeholder="输入订单备注" size="mini" @change="rowChange(scope.row,scope.$index)"></el-input>
           <p v-else>{{scope.row.remarks}}</p>
@@ -190,6 +197,7 @@
 import addProduct from '@/template/toolBorrowingCanUseProduct/index.vue'
 import addTool from '@/template/addTool/index'
 import uploadAllData from '@/components/uploadAllData/index'
+import excel from '@/HDrpManagement/orderManage/details/export_excel'
 export default {
   props:['data','type'],
   data () {
@@ -197,6 +205,8 @@ export default {
       dataRefresh:true,
       tableData:[],
       tablecolsAdd:[],
+      columnTitle:[],
+      excelTitle:'借用单明细',
       param:{
         "id": 20230116104102,
         "content": {
@@ -231,7 +241,7 @@ export default {
     }
   },
   components:{
-    addProduct,addTool,uploadAllData
+    addProduct,addTool,uploadAllData,excel
   },
   methods:{
     async listData () {
@@ -434,6 +444,13 @@ export default {
   },
   mounted () {
     this.listData()
+    this.columnTitle  = []
+    this.$refs.multipleTable.$children.forEach(obj => {
+
+    let columnChild = {'columnname':obj.prop,'filter':0,'rowindex':'','sequence':'','title':obj.label,'width':obj.width}
+    // 存到columnTitle数组中
+    this.columnTitle.push(columnChild)
+    })
   },
   created() {
     this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addToolTable.tablecols

+ 5 - 0
src/components/export_excel/index.vue

@@ -48,6 +48,11 @@ export default {
           res.data.forEach(e => {
             e.projecttype = e.projecttype + '-' + e.projecttype_remarks
           })
+        } else if (e.title === '授权角色') {
+          res.data.forEach(e => {
+            e.roleName = e.userrole.map(item => item.remarks).join(',')
+          })
+          console.log(res.data,'结果');
         }
       });
       let hd = table.map(e=>{

+ 1 - 0
src/components/previewImage/index.vue

@@ -6,6 +6,7 @@
       style="width: 100%;height:100%"
       :src="image.url"
       fit="cover"
+      :lazy="true"
       :preview-src-list="srcList">
     </el-image>
     <div class="mode flex-align-center flex-around">

+ 2 - 2
vue.config.js

@@ -15,8 +15,8 @@ module.exports = {
       proxy: {
         '/apis': {
           // target: 'http://61.164.207.46:8000',  // target host*/
-          // target: 'http://192.168.3.9:8080',  // target host*!
-          target: 'https://oms.idcgroup.com.cn:8079/',  // target host
+          target: 'http://192.168.3.9:8090',  // target host*!
+          // target: 'https://oms.idcgroup.com.cn:8079/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets 
           changeOrigin: true,  // needed for virtual hosted sites