Преглед изворни кода

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

luobang пре 2 година
родитељ
комит
355a44cecd

+ 19 - 0
src/utils/base64ToBlob.js

@@ -22,6 +22,25 @@ function base64ToBlob(urlData, type) {
   })
 }
 
+/**
+ * 返回图片本地file
+ * @param {*} urlData 
+ * @returns 
+ */
+export  function creatImageFile(urlData,fileName){
+  //获得blob对象
+  let blob = base64ToBlob(urlData, "image") 
+  //获取类型
+  let type=urlData.split("data:").join('').split(";base64")[0];
+  //创建文件对象
+  return transToFile(blob,fileName,type);
+}
+
+
+async function transToFile(blob, fileName, fileType) {
+  return new window.File([blob], fileName, {type: fileType})
+}
+
 /**
  * desc: 下载导出文件
  * @param blob  :返回数据的blob对象或链接

+ 1 - 1
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -262,7 +262,7 @@
               </div>
               <div class="poundNo from">
                 <span class="text">运输订单号:</span>
-                <el-input v-model="orderNumber" disabled></el-input>
+                <el-input v-model="orderNumber"></el-input>
               </div>
               <div class="poundNo from">
                 <span class="text">订单状态:</span>

+ 50 - 7
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -67,7 +67,7 @@
             style="width:150px"
           >
           </el-date-picker>
-          <el-button type="primary" class="btn" @click="onclick()">
+          <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
         </el-form-item>
@@ -784,6 +784,15 @@
             type="number"
           ></el-input>
         </el-form-item>
+        <el-form-item label="发票日期">
+            <el-date-picker
+            v-model="statementTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:200px"
+          >
+        </el-date-picker>
+        </el-form-item>
         <el-form-item label="发票图片" style="">
           <el-upload
             ref="statementUpload"
@@ -828,6 +837,7 @@ export default {
   },
   data() {
     return {
+      statementTime:null,
       saleOrderMaterialIds: [],
       batchAddressProvince: '',
       batchAddressDistrict: '',
@@ -884,6 +894,10 @@ export default {
         {
           value: '下货地址',
           lable: '下货地址'
+        },
+        {
+          value: '收款客户',
+          lable: '收款客户'
         }
       ],
       options1: [
@@ -902,6 +916,10 @@ export default {
         {
           value: '下货地址',
           lable: '下货地址'
+        },
+        {
+          value: '收款客户',
+          lable: '收款客户'
         }
       ],
       //合计净重(磅重)
@@ -1550,8 +1568,8 @@ export default {
     },
     generateStatement() {
       this.isLoading = true
-      if (!this.excludeTax) {
-        this.$message.warning('请填写发票金额')
+      if (!this.excludeTax ||! this.statementTime) {
+        this.$message.warning('请填写所有信息!')
         this.isLoading = false
       } else if (this.statementList.length < 1) {
         this.$message.warning('请上传发票')
@@ -1574,6 +1592,8 @@ export default {
         formData.append('orderList', orderList)
         formData.append('excludeTax', this.excludeTax)
         formData.append('userId', getCookie('userId'))
+        console.log("statementTime:",this.statementTime);
+        formData.append('statementTime',this.statementTime.getTime());
         let options = {
           url: '/api/v1/bms/addTruckStatement',
           data: formData,
@@ -3236,6 +3256,9 @@ export default {
       this.selecteddetailsOrderAmount = 0
       this.amsPriceList = []
       this.isRowClick = 0
+      if(!obj){
+        obj=new Object();
+      }
       if (this.activeName == 'first') {
         const loading = this.$loading({
           lock: true,
@@ -3268,6 +3291,16 @@ export default {
             JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
           obj.consigneeLoginName = consigneeLoginName
         }
+        if (this.screen == '收款客户' && this.screen1 == '收款客户') {
+          obj.paymentCustomer = [this.input, this.input1]
+        }else {
+          if (this.screen == '收款客户') {
+            obj.paymentCustomer = [this.input]
+          } 
+          if (this.screen1 == '收款客户') {
+            obj.paymentCustomer = [this.input1]
+          } 
+        }
         if (this.screen == '客户') {
           consigneeName = this.input
         } else if (this.screen == '承运商') {
@@ -3277,7 +3310,7 @@ export default {
         } else if (this.screen == '分录ID') {
           console.log('进入了分录')
           easPrimaryId = this.input
-        } else {
+        } else if(this.screen != '收款客户' && this.input){
           remark = this.input
         }
         if (
@@ -3298,7 +3331,7 @@ export default {
           this.input1 != ''
         ) {
           capacityNo = this.input1
-        } else if (this.input1 != null && this.input1 != '') {
+        } else if (this.screen1 != '收款客户' && this.input1) {
           remark = this.input1
         }
         this.axios
@@ -3379,6 +3412,16 @@ export default {
           obj.consigneeLoginName = consigneeLoginName
         }
         console.log(this.screen1, this.input1, 'here')
+        if (this.screen == '收款客户' && this.screen1 == '收款客户') {
+          obj.paymentCustomer = [this.input, this.input1]
+        }else {
+          if (this.screen == '收款客户') {
+            obj.paymentCustomer = [this.input]
+          } 
+          if (this.screen1 == '收款客户') {
+            obj.paymentCustomer = [this.input1]
+          } 
+        }
         if (this.screen == '客户') {
           consigneeName = this.input
         } else if (this.screen == '承运商') {
@@ -3388,7 +3431,7 @@ export default {
         } else if (this.screen == '分录ID') {
           console.log('进入了分录')
           easPrimaryId = this.input
-        } else {
+        } else if(!this.screen && this.input){
           remark = this.input
         }
         if (
@@ -3409,7 +3452,7 @@ export default {
           this.input1 != ''
         ) {
           capacityNo = this.input1
-        } else if (this.input1 != null && this.input1 != '') {
+        } else if(!this.screen1 && this.input1) {
           remark = this.input1
         }
         this.axios

+ 105 - 55
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckStatementNew.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="steel_inbound" style="width:100%">
     <div class="sache">
-      <el-input placeholder="请输入收货客户" v-model="input" clearable> </el-input>
+      <el-input placeholder="请输入收货客户或承运商" v-model="input" clearable> </el-input>
       <el-date-picker
             v-model="startTime"
             type="date"
@@ -68,7 +68,7 @@
     <el-dialog
       title="详单信息"
       :visible.sync="isShowDetails"
-      style="height:600px;width:100%"
+      width="80%"
       >
       <div>
         <el-button icon="el-download" type="primary" @click="exportExcel('详单信息')">导出Excel</el-button>
@@ -85,7 +85,7 @@
               individual-panel
             >
             <el-table-column
-                width="50"
+                width="40"
                 label="序号"
                 align="center"
                 :resizable="false"
@@ -99,95 +99,82 @@
                 label="订单日期"
                 width="110px"
                 align="center"
-                show-overflow-tooltip
               >
               </el-table-column>
               <el-table-column
                 prop="saleMakeDate"
-                label="制单时间"
-                width="110px"
+                label="制单日期"
+                width="130px"
                 align="center"
               >
               </el-table-column>
               <el-table-column
-                prop="capacityNo"
-                column-key="capacityNo"
-                label="车号"
+                prop="newCapacityNo"
+                column-key="newCapacityNo"
+                label="车号"
                 align="center"
                 width="90px"
                 sortable
                 show-overflow-tooltip
+                :filters="filterCapacityList"
               >
               </el-table-column>
               <el-table-column
-                prop="addressPlace"
-                label="收货地址"
-                width="250px"
-                sortable
-                column-key="addressPlace"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="actualAddress"
-                label="实际收货地址"
-                width="250px"
+                prop="consigneeName"
+                label="客户"
+                width="160px"
+                align="center"
+                column-key="consigneeName"
+                :filters="filterConsigneeList"
                 sortable
-                column-key="actualAddress"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="priceValue"
-                label="最终运价"
-                width="100px"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="detailsAmount"
-                label="最终运费"
-                width="100px"
-              ></el-table-column>
-              <el-table-column
-                prop="netWeight"
-                label="净重"
-                show-overflow-tooltip
-              >
-              </el-table-column>
-              <el-table-column
-                prop="materialWeight"
-                label="理重"
                 show-overflow-tooltip
               >
               </el-table-column>
               <el-table-column
                 prop="materialName"
                 column-key="materialNameList"
-                label="物名称"
+                label="物料名称"
                 align="center"
                 width="150px"
                 sortable
+                :filters="filtermaterialNameList"
               >
               </el-table-column>
               <el-table-column
                 prop="materialSpe"
-                label="物资规格"
+                label="规格型号"
                 column-key="materialSpe"
                 align="center"
                 sortable
+                :filters="filtermaterialSpe"
                 width="120px"
               >
               </el-table-column>
               <el-table-column
                 prop="materialPlanNumber"
-                label="计划件数"
+                label="辅助数量"
                 align="center"
-                width="50px"
+                width="100px"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="materialAcWeight"
+                label="累计出库数量"
+                align="center"
+                width="100px"
               >
               </el-table-column>
               <el-table-column
                 prop="materialNum"
-                label="装车件数"
+                label="累计检斤通知单辅助数量"
                 align="center"
-                width="50px"
+                width="150px"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="netWeight"
+                label="磅重"
+                show-overflow-tooltip
               >
               </el-table-column>
               <el-table-column
@@ -196,6 +183,40 @@
                 label="摘要"
                 width="150px"
                 align="center"
+                :filters="filterSaleRemark"
+                show-overflow-tooltip
+              >
+              </el-table-column>
+              <el-table-column
+                prop="carrierName"
+                label="承运商"
+                align="center"
+                width="80px"
+                column-key="carrierList"
+                sortable
+                show-overflow-tooltip
+                :filters="filterCarrierList"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="addressPlace"
+                label="下货地点"
+                width="300px"
+                sortable
+                column-key="actualAddress"
+              >
+              </el-table-column>
+              <el-table-column prop="priceValue" label="单价" width="100px">
+              </el-table-column>
+              <el-table-column
+                prop="detailsAmount"
+                label="运费"
+                width="100px"
+              ></el-table-column>
+              <el-table-column
+                prop="closeEntryId"
+                label="分录ID"
+                width="120px"
                 show-overflow-tooltip
               >
               </el-table-column>
@@ -212,14 +233,34 @@
                 width="150px"
                 align="center"
                 column-key="saleAreaList"
+                :filters="filterSaleAreaList"
               >
               </el-table-column>
+              <el-table-column prop="unloadType" label="卸货类型" width="60px">
+              </el-table-column>
               <el-table-column
-                prop="unloadType"
-                label="卸货类别"
-                width="60px"
+                prop="saleOrderReceiveCustomer"
+                label="收款客户"
+                width="120px"
+                show-overflow-tooltip
               >
               </el-table-column>
+              <!-- <el-table-column
+                prop="addressPlace"
+                label="收货地址"
+                width="250px"
+                sortable
+                column-key="addressPlace"
+                :filters="filteraddressPlace"
+              >
+              </el-table-column> -->
+              <el-table-column
+                prop="materialWeight"
+                label="理重"
+                show-overflow-tooltip
+              >
+              </el-table-column>
+
               <el-table-column
                 prop="paymentCustomer"
                 label="付款单位"
@@ -234,9 +275,10 @@
                 show-overflow-tooltip
               >
               </el-table-column>
+
               <el-table-column
-                prop="saleOrderReceiveCustomer"
-                label="收款单位"
+                prop="recordUserName"
+                label="操作人"
                 width="120px"
                 show-overflow-tooltip
               >
@@ -313,7 +355,15 @@ export default {
     }
     this.startTime=new Date();
     this.endTime=new Date();
-    this.startTime.setDate(1);
+    this.startTime.setDate(26);
+    this.endTime.setDate(25);
+    console.log("month:",this.startTime.getMonth());
+    if(this.startTime.getMonth()==0){
+      this.startTime.setFullYear(this.startTime.getFullYear()-1);
+      this.startTime.setMonth(11);
+    }else{
+      this.startTime.setMonth(this.startTime.getMonth()-1);
+    }
     this.onclick();
   },
   methods:{

+ 84 - 3
src/views/statisticalReport/components/inwardReport/putInwardReport.vue

@@ -19,14 +19,50 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" class="btn" @click="openDrawer">修改订单回传金蝶</el-button>
       <span style="margin-left: 1rem;">首次/二次合计净重:</span>
       <el-input v-model="totalNumberFrist" :disabled="true" style="width: 140px;"></el-input>
       <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 50px;"></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func" @selection-change="selectionChange"></dilTable>
     </div>
+    <el-drawer
+      :visible.sync="drawer"
+      direction="rtl"
+      :before-close="handleClose"
+      size="80%"
+    >
+    <el-input
+        placeholder="请输入"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="searchOrder"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="reSentEas"
+        style="margin-bottom: 15px">
+        确定上传金蝶
+      </el-button>
+      <div>
+        <dilTable
+        ref="ordertable"
+          v-bind.sync="purchaseOption"
+          @radio-change="orderChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -40,7 +76,18 @@ export default {
       totalNumberFrist:null,
       totalCapacity:null,
       option: {
-        requestUrl: "",
+        requestUrl: "",// 控制显示多选列
+        selectionType: "select",
+      },
+      drawer:false,
+      input:null,
+      purchaseOrder:null,
+      selection:[],
+      purchaseOption:{
+         // 表格请求数据的地址
+        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        // 控制选择单列
+        selectionType: "radio"
       },
       startTime: null,
       endTime: null,
@@ -51,6 +98,40 @@ export default {
           this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441&startTime=null&endTime=null&i=' +new Date()
   },
   methods: {
+    selectionChange(selection){
+      this.selection=selection;
+    },
+    openDrawer(){
+      if(!this.selection || this.selection.length<=0){
+        this.$alert("请先勾选需要修改的运单!");
+        return;
+      }
+      this.drawer = true;
+    },
+    searchOrder(){
+        this.purchaseOption.requestUrl="/api/v1/ams/getPurchaseOrderList?apiId=81&con="+this.input
+    },
+    orderChange(selection) {
+      this.purchaseOrder=selection;
+    },
+    handleClose(){
+      this.drawer=false;
+      this.purchaseOrder=null;
+    },
+    reSentEas(){
+      if(!this.selection || this.selection.length<=0 || !this.purchaseOrder){
+        this.$alert("请先主动勾选采购订单!");
+        return;
+      }
+      let map={
+        list:this.selection,
+        purchaseOrder: this.purchaseOrder
+      }
+      console.log(map);
+      this.axios.post('/api/v1/bp/insertToUploadEas',map).then((res)=>{
+          this.$message.success(res.data.data);
+      });
+    },
     func(res){
         console.log(res)
         var resultNetWeightTotalFirst = 0

+ 41 - 31
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -832,6 +832,7 @@
                 >反关闭运单</el-button
               >
             </div>
+            <el-button  round @click="resetPrintNumber">重置打印次数</el-button>
           </div>
           <div class="steelMapClass3">
             <div class="steelMapClass32">
@@ -1165,9 +1166,10 @@
             action="/api/v1/otms/addtmstruckArrivalResult"
             :limit="12"
             :on-change="fileChange1"
+            :on-remove="fileChange1"
             :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
-            accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
             :auto-upload="false"
           >
             <i class="el-icon-plus"></i>
@@ -1181,9 +1183,10 @@
             action="null"
             :limit="11"
             :on-change="fileChange2"
+            :on-remove="fileChange2"
             :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
-            accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
             :auto-upload="false"
           >
             <i class="el-icon-plus"></i>
@@ -1575,7 +1578,7 @@ import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
-import { downloadFile } from '@/utils/base64ToBlob.js'
+import { downloadFile,creatImageFile } from '@/utils/base64ToBlob.js'
 export default {
   components: {
     PathView,
@@ -2092,6 +2095,15 @@ export default {
   },
   computed: {},
   methods: {
+    resetPrintNumber(){
+      this.axios.post('/api/v1/bp/resetPrintNumber',this.steelMap).then((res)=>{
+        if(res.data.status=='succeed'){
+          this.$message.success("重置成功!");
+        }else{
+          this.$message.error("重置失败!");
+        }
+      });
+    },
     showBatchCapacity() {
       this.capacityNo = null
       this.capacityId = null
@@ -2135,8 +2147,7 @@ export default {
           return
         }
         console.log('this.batchCapacityList', this.batchCapacityList)
-        // this.batchCapacityList.forEach(row => {})
-        for (let i = 0; i < this.batchCapacityList.length; i++) {
+         this.batchCapacityList.forEach(row => {
           row.capacityId = this.capacityId
           row.capacityNumber = this.capacityNo
           //是否校验GPS
@@ -2146,31 +2157,22 @@ export default {
             this.$message.error('请先授权承运商!')
             return
           }
-          if (row.capacityIds != 0) {
-            await this.axios
-              .post('/api/v1/ams/updateCapacityNumberInFactory', row)
-              .then(res => {
-                if (res.data.code == 200) {
-                  console.log(res.data)
-                } else {
-                  this.$message.error(res.data.data)
-                }
-              })
-          } else {
+          if (row.capacityIds == 0) {
             row.lineId = this.lineSpelling[row.size]
-            let arr = []
-            arr.push(row)
-            await this.axios
-              .post('/api/v1/ams/dispatchSteelOrder', arr)
+          }
+         })
+         let map={
+          list:this.batchCapacityList
+         }
+        await this.axios
+              .post('/api/v1/ams/batchUpdateCapacity',map )
               .then(res => {
                 if (res.data.code == '200') {
                   this.$message.success('派车成功!')
                 } else {
                   this.$message.error(res.data.data)
                 }
-              })
-          }
-        }
+        })
         this.batchCarrierVisible = false
         this.getSteelReport()
       } else {
@@ -2651,10 +2653,13 @@ export default {
           if (res.data) {
             this.arriavlList = []
             res.data.forEach((e, index) => {
-              this.arriavlList.push({
-                name: 'file' + index,
-                url: e
-              })
+              creatImageFile(e,'file1-'+index).then((res)=>{
+                this.arriavlList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              });
             })
             this.fileListArrival = this.arriavlList
           }
@@ -2667,10 +2672,13 @@ export default {
           if (res.data) {
             this.receiveList = []
             res.data.forEach((e, index) => {
-              this.receiveList.push({
-                name: 'file' + index,
-                url: e
-              })
+              creatImageFile(e,'file2-'+index).then((res)=>{
+                this.receiveList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              });
             })
             this.fileListReceive = this.receiveList
           }
@@ -2730,7 +2738,9 @@ export default {
         this.axios(options).then(res => {
           console.log('receiveRes:', res)
           this.$message.success('上传成功!')
+          this.steelMap.arrivalAddress = this.location
           this.closeUpload()
+          this.refresh();
         })
       })
     },