Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 2 years ago
parent
commit
ac2207653c

+ 3 - 2
public/static/payprint3.html

@@ -171,8 +171,9 @@
         }
         
         .sfcard-title {
-            font-size: 24px;
+            font-size: 14px;
             text-align: center;
+            margin-bottom: 12px;
         }
         
         .center {
@@ -1191,7 +1192,7 @@
             }
             //公司id
             this.compId = localStorage.getItem('ws-pf_compId')
-            if(this.compId == '5d164edcef03476dba6630f86dc96496'){
+            if (this.compId == '5d164edcef03476dba6630f86dc96496') {
                 this.compId = '6a713699e08c4cbc97a87f7648a95e3d'
             }
             this.date = new Date().toLocaleString()

+ 5 - 6
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -240,10 +240,10 @@
           <div style="text-align:center">
             <el-form ref="form" label-width="110px">
               <el-form-item label="客户名">
-             <el-select filterable clearable v-model="customerName" placeholder="请选择客户" class="typeselect"
+             <el-select filterable clearable v-model="customerNumberCard" placeholder="请选择客户" class="typeselect"
               @change="customerChange">
-              <el-option v-for="item in customerlist" :key="item.customerName" :label="item.customerName"
-                :value="item.customerName" />
+              <el-option v-for="item in customerlist" :key="item.customerNumberCard" :label="item.customerName"
+                :value="item.customerNumberCard" />
             </el-select>
             </el-form-item>
            <el-form-item label="手机号">
@@ -751,11 +751,10 @@
         }
       },
       customerChange(e){
-        this.customerName = e
         for(let i = 0 ; i < this.customerlist.length ; i++){
-          if(this.customerName == this.customerlist[i].customerName){
+          if(this.customerNumberCard == this.customerlist[i].customerNumberCard){
             this.customerPhone = this.customerlist[i].customerPhone
-            this.customerNumberCard = this.customerlist[i].customerNumberCard
+            this.customerName = this.customerlist[i].customerName
           }
         }
       },

+ 2 - 2
src/views/profitable/expensemanagementdetails.vue

@@ -925,8 +925,8 @@ export default {
         compId: localStorage.getItem('ws-pf_compId'),
         // startDate: this.startDate,
         // endDate: this.endDate,
-        startDate: localStorage.getItem('startDate'),
-        endDate: localStorage.getItem('endDate'),
+        startDate: localStorage.getItem('startDate')?localStorage.getItem('startDate'):this.startDate,
+        endDate: localStorage.getItem('endDate')?localStorage.getItem('endDate'):this.endDate,
         searchKeyWord: this.searchKeyWord,
         expenseName:this.expenseName,
         currentPage: this.currentPage,

+ 1 - 1
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -146,7 +146,7 @@
 
             <span class="corles" v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.delete`
-              " v-if="!scope.row.approveStatus&&scope.row.completedQuantity== '0'" @click="deleteclick(scope.row)">删除</span>
+              " v-if="(!scope.row.approveStatus&&scope.row.completedQuantity== '0')||scope.row.approveStatus == '发起人撤回'" @click="deleteclick(scope.row)">删除</span>
           </template>
         </el-table-column>
       </el-table>

+ 48 - 10
src/views/universalityAudit/auditprint.vue

@@ -4,23 +4,24 @@
 
     <div class="center">
       <el-row style='margin-bottom:10px;'>
-        <el-col :span="14">
+        <el-col :span="16">
           <div style='margin-left:10px;' class="datascreen">
             <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" unlink-panels range-separator="至"
-              start-placeholder="起始日期" end-placeholder="截止日期" :picker-options="pickerOptions" class="data_css"
+              start-placeholder="起始日期" end-placeholder="截止日期" :picker-options="pickerOptions" class="data_css" clearable
               @change="changeDate">
             </el-date-picker>
             <el-select class="typechange" style="margin-left:10px;" v-model="businessType" filterable clearable placeholder="选择类型" @change="typeChange">
                 <el-option v-for="item in xialaList" :key="item.value" :label="item.label" :value="item.value"
                 style="color: #8890b1" />
             </el-select>
-            <el-input placeholder="可按发起人姓名或业务编号查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-input placeholder="可按发起人姓名、业务编号查找" class="input_css" v-model="searchKeyWord" clearable></el-input>
+            <el-input placeholder="按金额查找" class="input_css" v-model="amountMoney" clearable></el-input>
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                     src="../../../public/img/sousuo.png" alt="" /></el-button>
         </div>
           
         </el-col>
-        <el-col style="text-align:right;" :span="10">
+        <el-col style="text-align:right;" :span="8">
           <el-button style="margin-right:10px" @click="printlist" type="primary">批量打印</el-button>
         </el-col>
       </el-row>
@@ -119,6 +120,7 @@ export default {
       pageSize: 10,
       businessType: '',
       searchType: '',
+      amountMoney:'',
       searchKeyWord: '',
       startDate: '',
       endDate: '',
@@ -151,10 +153,11 @@ export default {
       compId: localStorage.getItem('ws-pf_compId'),
       currectdata: {},
       dialogVisible1: false,
-      recordList: []
+      recordList: [],
     }
   },
   activated() {
+    this.getPassYearFormatDate()
     this.getList()
   },
   methods: {
@@ -626,12 +629,45 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    getPassYearFormatDate() {
+      if (!localStorage.getItem('startDateAudit') && !localStorage.getItem('endDateAudit')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 7)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDateAudit = year + '-' + month + '-' + strDate
+        this.endDateAudit = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDateAudit = localStorage.getItem('startDate')
+        this.endDateAudit = localStorage.getItem('endDate')
+      }
+      this.value = [this.startDateAudit, this.endDateAudit]
+    },
     async getList() {
         printlist({
         compId:localStorage.getItem('ws-pf_compId'),
-        startDate: this.startDate,
-        endDate: this.endDate,
+        startDate: localStorage.getItem('startDateAudit')?localStorage.getItem('startDateAudit'):this.startDateAudit,
+        endDate: localStorage.getItem('endDateAudit')?localStorage.getItem('endDateAudit'):this.endDateAudit,
         searchKeyWord: this.searchKeyWord,
+        amountMoney: this.amountMoney,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
@@ -645,8 +681,10 @@ export default {
 
     changeDate() {
       if (this.value) {
-        this.startDate = this.value[0]
-        this.endDate = this.value[1]
+        this.startDateAudit = this.value[0]
+        this.endDateAudit = this.value[1]
+        localStorage.setItem('startDateAudit', this.startDateAudit)
+        localStorage.setItem('endDateAudit', this.endDateAudit)
       }
       this.getList()
     },
@@ -753,7 +791,7 @@ table {
   }
 
   .input_css {
-    width: 50%;
+    width: 70%;
     margin: 0 10px;
   }
 

+ 52 - 39
src/views/warehousenew/warehouseManagementList.vue

@@ -69,7 +69,7 @@
           <div class="reservesInfo_item" v-if="warehouseType == '1'"><div class="reservesInfo_GoodsName">{{item.goodsName}}</div>
           <span class="reservesInfo_Amount">{{item.stockNum == 0 ? "-":item.stockNum}}(吨)</span><br/>
           <span v-if="item.stockNum&&item.cost" class="reservesInfo_Amount">{{item.cost == 0 ? "-":item.cost}}(元/吨)</span>
-          <span v-if="item.conversionCost" class="reservesInfo_Amount">{{item.conversionCost == 0 ? "-":item.conversionCost}}(元/吨)</span>
+          <span v-else class="reservesInfo_Amount">{{item.conversionCost == 0 ? "-":item.conversionCost}}(元/吨)</span>
           </div>
           <div class="reservesInfo_item" v-if="warehouseType == '2'"><div class="reservesInfo_GoodsName">{{item.goodsName}}(吨)</div><span class="reservesInfo_Amount">{{item.surplus == 0 ? "-":item.surplus}}</span></div>
         </div>
@@ -1202,47 +1202,60 @@
           })
         }else{
           getQualityZhe({
-            compId: localStorage.getItem('ws-pf_compId'),
-            baseId: this.warehouseInfo.warehouseId
-          }).toPromise().then((response) =>{
-            console.log(this.totalReserves)
-            this.totalMoney = 0
-            for(let j = 0;j<this.totalReserves.length;j++){
-              if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
-                this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) *  Number(this.totalReserves[j].stockNum)).toFixed(3)
-                this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
-                for(let r = 0;r<response.warehouseNumViewList.length;r++){
-                    if(this.totalReserves[j].goodsName == response.warehouseNumViewList[r].goodsName){
-                      this.$message.error('当前仓库无潮粮库存,无需折算!')
-                      this.value = '0'
-                      return
-                    }
-                }
+          compId: localStorage.getItem('ws-pf_compId'),
+          baseId: this.warehouseInfo.warehouseId
+        }).toPromise().then((response) => {
+          console.log(this.totalReserves)
+          this.totalMoney1 = 0
+          this.totalMoney2 = 0
+          for (let j = 0; j < this.totalReserves.length; j++) {
+            if (this.totalReserves[j].cost && this.totalReserves[j].stockNum) {
+              if (this.totalReserves[j].goodsName.indexOf('玉米') != -1) {
+                this.totalReserves[j].totalMoney1 = (Number(this.totalReserves[j].cost) * Number(this.totalReserves[j].stockNum)).toFixed(3)
+                this.totalMoney1 = (Number(this.totalMoney1) + Number(this.totalReserves[j].totalMoney1)).toFixed(3)
+              }
+              else if (this.totalReserves[j].goodsName.indexOf('高粱') != -1) {
+                this.totalReserves[j].totalMoney2 = (Number(this.totalReserves[j].cost) * Number(this.totalReserves[j].stockNum)).toFixed(3)
+                this.totalMoney2 = (Number(this.totalMoney2) + Number(this.totalReserves[j].totalMoney2)).toFixed(3)
               }
             }
-            if(response.warehouseNumViewList.length != 0){
-              var result = []
-              for(let i = 0; i < response.warehouseNumViewList.length ; i++){
-                let param ={}
-                if (response.warehouseNumViewList[i].pureWeight) {
-                  param.goodsName =response.warehouseNumViewList[i].goodsName
-                  param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
-                  param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
-                  result.push(param)
-                } 
-             }
-             console.log(result)
-             this.totalReserves = result
-              this.initCharts()
-            }
-            else{
-              this.$message.error('当前仓库无潮粮库存,无需折算!')
-              this.value = '0'
-                return
+          }
+          console.log(this.totalReserves)
+          if (response.warehouseNumViewList.length != 0) {
+            var result = []
+
+            for (let i = 0; i < response.warehouseNumViewList.length; i++) {
+              let param = {}
+              for (let num = 0; num < this.totalReserves.length; num++) {
+                if (response.warehouseNumViewList[i].goodsName == this.totalReserves[num].goodsName
+                  && response.warehouseNumViewList[i].goodsName != '玉米'
+                  && response.warehouseNumViewList[i].goodsName != '高粱') {
+                  param.cost = this.totalReserves[num].cost
+                }
+              }
+              if (response.warehouseNumViewList[i].pureWeight) {
+                param.goodsName = response.warehouseNumViewList[i].goodsName
+                param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
+                if (param.goodsName == '玉米') {
+                  param.conversionCost = (Number(this.totalMoney1) / Number(param.stockNum)).toFixed(3)
+                } else if (param.goodsName == '高粱') {
+                  param.conversionCost = (Number(this.totalMoney2) / Number(param.stockNum)).toFixed(3)
+                }
+                result.push(param)
+              }
             }
-          })
-        }
-			},
+            console.log(result)
+            this.totalReserves = result
+            this.initCharts()
+          }
+          else {
+            this.$message.error('当前仓库无潮粮库存,无需折算!')
+            this.value = '0'
+            return
+          }
+        })
+      }
+    },
       getList1(){
           getList({
             compId: localStorage.getItem('ws-pf_compId'),