ソースを参照

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

gjy 3 年 前
コミット
3b22922ec6

+ 41 - 21
src/views/home/index.vue

@@ -28,21 +28,21 @@
         <div class="content2">
           <el-row class="content2-aside">
             <h3 class="title">采购合同完成进度</h3>
-            <el-col :span="12" class="chart-card">
+            <el-col :span="12" class="chart-card" >
               <div style="font-weight: bold;" class="">
-                <div ref="myEchart1" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart1" style="height: 288px;" class="roseChart" @click="contract(0)"></div>
                 <div class="bottom-tip">统计单位:吨</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card">
+            <el-col :span="12" class="chart-card" >
               <div style="font-weight: bold;">
-                <div ref="myEchart2" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart2" style="height: 288px;" class="roseChart" @click="contract(0)"></div>
                 <div class="bottom-tip">统计单位:元</div>
               </div>
             </el-col>
             <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;">
-                <div ref="myEchart3" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart3" style="height: 288px;" class="roseChart" @click="contract(0)"></div>
                 <div class="bottom-tip">统计单位:元</div>
               </div>
             </el-col>
@@ -101,32 +101,32 @@
             <h3 class="left-title">销售合同完成进度</h3>
             <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;">
-                <div ref="myEchart4" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart4" style="height: 288px;" class="roseChart" @click="contract(1)"></div>
                 <div class="bottom-tip">统计单位:吨</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card">
+            <el-col :span="12" class="chart-card" @click="contract(1)">
               <div style="font-weight: bold;">
-                <div ref="myEchart5" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart5" style="height: 288px;" class="roseChart" @click="contract(1)"></div>
                 <div class="bottom-tip">统计单位:元</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card">
+            <el-col :span="12" class="chart-card" >
               <div style="font-weight: bold;">
-                <div ref="myEchart6" style="height: 288px;" class="roseChart"></div>
+                <div ref="myEchart6" style="height: 288px;" class="roseChart" @click="contract(1)"></div>
                 <div class="bottom-tip">统计单位:元</div>
               </div>
             </el-col>
           </el-row>
         </div>
-        <el-dialog :append-to-body="true" :show-close='false' :visible.sync="dialogVisible" width="30%"
+        <!-- <el-dialog :append-to-body="true" :show-close='false' :visible.sync="dialogVisible" width="30%"
           :before-close="handleClose">
           <span>这是一段信息</span>
           <span slot="footer" class="dialog-footer">
             <el-button @click="dialogVisible = false">取 消</el-button>
             <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
           </span>
-        </el-dialog>
+        </el-dialog> -->
         <!-- <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt=""> -->
       </div>
     </div>
@@ -416,6 +416,18 @@
           this.number.news = news
         })
       },
+      //跳转
+      contract(index){
+         if(index == 0){
+            this.$router.push({
+              name:"buyContract"
+            })
+          }else if(index == 1){
+            this.$router.push({
+              name:"salesContract"
+            })
+          }
+      },
       getTime() {
         const date = new Date();
         const year = date.getFullYear();
@@ -454,10 +466,12 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已完成量',
-                value: this.chartsData[i].biViewInfoList[0].count
+                value: this.chartsData[i].biViewInfoList[0].count,
+                type:"采购合同"
               }, {
                 name: '待完成量',
-                value: this.chartsData[i].biViewInfoList[1].count
+                value: this.chartsData[i].biViewInfoList[1].count,
+                type:"采购合同"
               }]
               text = '合同总量'
               formatter = '{b}{c}吨 </br> 占比{d}%'
@@ -470,10 +484,12 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已开票',
-                value: this.chartsData[i].biViewInfoList[0].count
+                value: this.chartsData[i].biViewInfoList[0].count,
+                type:"采购合同"
               }, {
                 name: '待开票',
-                value: this.chartsData[i].biViewInfoList[1].count
+                value: this.chartsData[i].biViewInfoList[1].count,
+                type:"采购合同"
               }]
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -485,10 +501,12 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已付款',
-                value: this.chartsData[i].biViewInfoList[0].count
+                value: this.chartsData[i].biViewInfoList[0].count,
+                type: "采购合同"
               }, {
                 name: '待付款',
-                value: this.chartsData[i].biViewInfoList[1].count
+                value: this.chartsData[i].biViewInfoList[1].count,
+                   type: "采购合同"
               }]
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -500,7 +518,8 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已完成量',
-                value: this.chartsData[i].biViewInfoList[0].count
+                value: this.chartsData[i].biViewInfoList[0].count,
+                  type: "销售合同"
               }, {
                 name: '待完成量',
                 value: this.chartsData[i].biViewInfoList[1].count
@@ -619,8 +638,9 @@
           myChart.off('click');
           myChart.on('click', function(params) {
             //  var a = params.dataIndex
-            console.log(params, '我被点击了');
-            app.dialogVisible = true
+            // console.log(params, '我被点击了');
+            // app.dialogVisible = true
+           return
           })
         }
         console.log(this.totalReserves)

+ 6 - 2
src/views/houseSelfCollect/inspectInfo.vue

@@ -63,8 +63,7 @@
               size="small" />
           </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
-              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabled1"
-                @change="waterContentChange">
+              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName" @change="waterContentChange">
                 <ws-option v-for="item in goodNameList" :key="item.goodsName" :label="item.goodsName"
                   :value="item.goodsName" />
               </ws-select>
@@ -205,6 +204,7 @@
         disabled: false,
         disabled1: false,
         disabled2: false,
+        disabledName:false,
         types: '1',
         information: '添加初检',
         goodNameList: [],
@@ -254,18 +254,22 @@
       if (this.types == 2) {
         this.disabled = true
         this.disabled1 = true
+        this.disabledName = true
         this.information = '查看质检'
       } else if (this.types == 3) {
         this.disabled = false
         this.disabled1 = true
+        this.disabledName = true
         this.information = '编辑初检'
       }else if (this.types == 4) {
         this.disabled = true
         this.disabled1 = true
+        this.disabledName = true
         this.information = '编辑复检'
       }else if (this.types == 5) {
         this.disabled = false
         this.disabled1 = true
+        this.disabledName = false
         this.information = '确认质检'
       }
       else{

+ 1 - 0
src/views/statisticalReport/autoSettlementList.vue

@@ -836,6 +836,7 @@ export default {
           }
           this.amountNotPayable += Number(this.modification[i].amountNotPayable)
         }
+         this.amountNotPayable  =  this.amountNotPayable.toFixed(2)
         this.dialogFormVisible1 = true
       }
     },

+ 62 - 18
src/views/warehouse/warehouseManagementList.vue

@@ -274,12 +274,7 @@
           </template>
         </el-table-column>
       </el-table>
-      
-    </div>
-
-
-
-    <div class="mask" v-show="isShowPrintType"></div>
+    </div> <div class="mask" v-show="isShowPrintType"></div>
     <div class="print-type" v-show="isShowPrintType">
       <div class="print-type-content">
         <div class="print-type-title">{{headerText}}</div>
@@ -311,9 +306,9 @@
                 />
             </el-select>
           </el-form-item>
-          <!-- <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
+          <el-form-item label="增量比例(%)" v-if="headerText == '打印记录'">
              <el-input placeholder="请输入增量比例" v-model="parameter.proportion" clearable class="proportion_css"></el-input>
-          </el-form-item> -->
+          </el-form-item>
             </el-form>
         </div>
       </div>
@@ -438,11 +433,14 @@ export default {
         var strDate = date.getDate()
         this.parameter.startDate = ""+year+"-"+month+"-"+(strDate-1)
         this.parameter.endDate = ""+year+"-"+month+"-"+strDate
-      this.isShowPrintType = true
+        this.$forceUpdate();
+        this.isShowPrintType = true
     },
     removePrint(){
+      this.parameter.warehouseName = ""
+      this.parameter.proportion = ""
         this.isShowPrintType = false
-        this.parameter = {}
+        
     },
     async submitClick(){
       if(!this.parameter.radio && this.headerText == "打印记录"){
@@ -509,16 +507,62 @@ export default {
           if(response.records.length == 0){
             this.$message.error("暂未查到所要打印的出入库信息")
           }else{
-            sessionStorage.setItem("inOutWarehouse_Print",JSON.stringify(response.records))
-          let i = ""
-          i = this.parameter.radio+"&warehouseName=" + this.parameter.warehouseName
-           window.open('../../../../../static/warehousePrint.html?type=' + i)
+            var warehousePrint = response.records
+            if(this.parameter.proportion){
+               var countWeight = 0
+            for(let i = 0 ; i < warehousePrint.length ; i++){
+              countWeight += Number(warehousePrint[i].netWeight)
+            }
+            var increment = (countWeight * (Number(this.parameter.proportion)/100)).toFixed(2)//所要增加的量
+            printAdd().toPromise()
+             .then((response1) => {
+                for(let i = 0 ; i < response1.length ; i++){
+                  increment = Number(increment)
+                  if(increment > 0){
+                    let index = Math.round(Math.random()*response1.length - 1)
+                    let pro = response1[index]  //取出假数据并设定值
+                     pro.inOutDate = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].inOutDate
+                     pro.contractNo = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].contractNo
+                     pro.companyName = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].companyName
+                     pro.goodsName = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].goodsName 
+                     pro.boxNo = warehousePrint[Math.round(Math.random()* warehousePrint.length - 1)].boxNo
+                    pro.netWeight = Number((Math.random()*(70-10+1)+10).toFixed(2))
+                     pro.tare = Number((Math.random()*(20-10+1)+10).toFixed(2))
+                    pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
+                      if(pro.netWeight < increment){
+                         increment = (increment - pro.netWeight).toFixed(2)  //所要增的量
+                        if(increment < 10 && pro.netWeight <= 60){
+                        pro.netWeight += Number(increment)
+                        pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
+                        increment = 0
+                         warehousePrint.push(pro)
+                          }else{
+                          warehousePrint.push(pro)
+                          }
+                      }else{
+                          pro.netWeight = Number(increment.toFixed(2))
+                          pro.grossWeight = Number((pro.tare + pro.netWeight).toFixed(2))
+                          increment = 0
+                          warehousePrint.push(pro)
+                      }
+                    response1.splice(index,1)//删除已添加过得假数据车牌号
+                  }else{
+                    sessionStorage.setItem("inOutWarehouse_Print",JSON.stringify(warehousePrint))
+                    let i = ""
+                    i = this.parameter.radio+"&warehouseName=" + this.parameter.warehouseName
+                    window.open('../../../../../static/warehousePrint.html?type=' + i)
+                    // return
+                  }
+                }
+             }) 
+             }else{
+                sessionStorage.setItem("inOutWarehouse_Print",JSON.stringify(response.records))
+                    let i = ""
+                    i = this.parameter.radio+"&warehouseName=" + this.parameter.warehouseName
+                    window.open('../../../../../static/warehousePrint.html?type=' + i)
+             }
           }
         })
-        // printAdd().toPromise()
-        // .then((response) => {
-        //   console.log(response)
-        // })
       }
     },
     startChane(e){

+ 6 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -410,7 +410,12 @@
 					if (index === 0) {
 						sums[index] = '合计'
 					} else if (
-						index === 6 
+						index === 4||
+						index === 5||
+						index === 6||
+						index === 7||
+						index === 8||
+						index === 9
 					) {
 						const values = data.map((item) => Number(item[column.property]))
 						if (!values.every((value) => isNaN(value))) {