gjy 3 năm trước cách đây
mục cha
commit
a860f80e03

+ 229 - 0
public/static/weightCheckOut.html

@@ -0,0 +1,229 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+    <style>
+      table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      #app {
+        /* height: 98vh;
+        position: relative; */
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        /* justify-content: space-between; */
+        margin-top: 5px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+      }
+
+      img {
+        width: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+
+      .config {
+        margin-top: 10px;
+        margin-right: 240px;
+      }
+      .autograph{
+    margin-top: 10px;
+     }
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+        font-size: 36px;
+        font-weight: 500;
+        margin-bottom: 20px;
+      }
+
+      .number {
+        text-align: right;
+        margin-bottom: 10px;
+        margin-top: 20px;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 400px;
+        margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto;
+        height: 450px;
+      }
+
+      .small-title {
+        text-align: center;
+        font-size: 18px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content" v-if="true">
+        <div class="title">出库检斤单</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">送货单位</td>
+            <td class="col" colspan="4">{{tableData.seller}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col" colspan="1">{{tableData.carNo}}</td>
+            <td class="col col-bgc">货名</td>
+            <td class="col" colspan="1">{{tableData.goodsName}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="4">{{tableData.buyer}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col"colspan="1">{{tableData.type}}</td>
+            <td class="col col-bgc">检斤时间</td>
+            <td class="col" colspan="1">{{tableData.updateDate}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">毛重(吨)</td>
+            <td class="col" colspan="2">{{tableData.grossWeight}}</td>
+            <td class="col col-bgc">皮重(吨)</td>
+            <td class="col" colspan="2">{{tableData.tare}}</td>
+            <td class="col col-bgc">净重(吨)</td>
+            <td class="col" colspan="2">{{tableData.netWeight}}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>检斤员:{{tableData.backOffice}}</div>
+          </div>
+          <div class="bottom-row2">
+            <div class="config">收货单位签名或盖章:</div>
+            <div class="autograph">客户签名:</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: {
+          // qualityInspectionManagement:{}
+        },
+        name: "",
+        bigContent: false,
+        smallContent: false
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        console.log(decodeURIComponent(this.getQueryVariable("tableData")))
+        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        if (_type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        console.log(_data,"sddsd")
+        this.tableData = JSON.parse(_data)
+        console.log(this.tableData)
+        document.title = "粮食检斤单"
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 12 - 1
src/components/mapdrag/mapdrag.vue

@@ -170,9 +170,9 @@
     },
     async created() {
       
-        
     },
     mounted() {
+      
       // AMapLoader.reset();
       // 已载入高德地图API,则直接初始化地图
       if (window.AMap && window.AMapUI) {
@@ -265,6 +265,7 @@
                     geocoder.getAddress(result1.districtList[0].center, function(status, result) {
                       if (status === 'complete') {
                         var obj = {}
+
                         that.province = result.regeocode.addressComponent.province
                         that.city = result.regeocode.addressComponent.city
                         that.district = result.regeocode.addressComponent.district
@@ -377,6 +378,16 @@
       }
     },
     methods: {
+       clearVal () {
+       this.address = ''
+       this.center=''
+        var status = {
+          zoomEnable: true,
+          dragEnable: true,
+        }
+        this.map.setStatus(status)
+        this.loadmap()
+    },
       positions() {
         this.status = false
         var status = {

+ 4 - 0
src/layout/index/top/index.vue

@@ -27,6 +27,9 @@
         <span style="padding: 0 2px">{{ getDay }}</span
         >{{ $t('common.days') }}
       </div>
+      <div  class="right-menu-item hover-effect dayClass">
+      {{compName}}
+      </div>
       <el-tooltip
         v-if="showColor"
         effect="dark"
@@ -291,6 +294,7 @@ export default {
       // deptName: '',
       // deptId: '',
       // staffName: '',
+      compName: localStorage.getItem('ws-pf_compName'),
       account: localStorage.getItem('ws-pf_account'),
       // compName: '',
       companyId: localStorage.getItem('ws-pf_compId'),

+ 1 - 2
src/permission.js

@@ -20,9 +20,8 @@ router.beforeEach(async (to, _, next) => {
   const hasToken = getToken();
   if (hasToken) {
     if (whiteList.includes(to.path)) {
-      console.log(111111)
       next({
-        path: '/login'
+        path: '/'
       });
       NProgress.done();
     } else {

+ 3 - 3
src/views/contractManagement/purchaseContractAdd.vue

@@ -83,12 +83,12 @@
           <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
              @select="handleSelect"></el-autocomplete>
              -->
-            <ws-select  v-model="deptBudgetList.seller" placeholder="请选择卖方名称" class="typeselect" 
+            <el-select filterable  v-model="deptBudgetList.seller" placeholder="请选择卖方名称" class="typeselect" 
             @change="sellerSelect">
 
-            <ws-option v-for="(item,index) in customerinfo" :key="index"  :label="item.customerName"
+            <el-option v-for="(item,index) in customerinfo" :key="index"  :label="item.customerName"
               :value="item.customerName" />
-          </ws-select>
+          </el-select>
         </ws-form-item>
            <!-- 发货反馈负责人 -->
           <ws-form-item label="发货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType == '2'">

+ 3 - 3
src/views/contractManagement/salesContractAdd.vue

@@ -50,11 +50,11 @@
             <!-- <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" /> -->
             <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
               placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete> -->
-              <ws-select  v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" 
+              <el-select filterable v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" 
             @change="buyerSelect">
-            <ws-option v-for="item in customerinfo" :key="item.customerName"  :label="item.customerName"
+            <el-option v-for="item in customerinfo" :key="item.customerName"  :label="item.customerName"
               :value="item.customerName" />
-              </ws-select>
+              </el-select>
           </ws-form-item>
           <!--运输方式-->
           <ws-form-item label="运输方式" span="1" prop="shippingType">

+ 11 - 3
src/views/warehouse/warehouseManagementAdd.vue

@@ -98,7 +98,7 @@
       </div>
       <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
       <!-- <map-drag  @marker="marker" @selectedAddress="selectedAddress" @provinceChange='provinceChange' @pickedAddress='getInfo'></map-drag> -->
-      <map-drag @marker="marker" :isShowaddress='false' v-on:addressListen='getAddress' v-on:pickedAddress='searchAddress' ></map-drag>
+      <map-drag @marker="marker" ref="childMap" :isShowaddress='false' v-on:addressListen='getAddress' v-on:pickedAddress='searchAddress' ></map-drag>
     </ws-form>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
@@ -212,6 +212,10 @@
     },
     mounted() {
       this.getList()
+       // 调用子组件的方法
+    },
+    activated(){
+      this.$refs.childMap.clearVal()
     },
     computed: {
       totalStorage: function() {
@@ -455,7 +459,9 @@
                     .toPromise()
                     .then((response) => {
                       this.$message.success('添加成功')
-                      this.deptBudgetList = {}
+                      this.deptBudgetList = {
+                        automaticWeightAcquisition:'0'
+                      }
                       this.freightspace = [{
                         binNumber: '',
                         maxStorage: '',
@@ -554,7 +560,9 @@
                     .toPromise()
                     .then((response) => {
                       this.$message.success('添加成功')
-                      this.deptBudgetList = {}
+                      this.deptBudgetList = {
+                        automaticWeightAcquisition:'0'
+                      }
                       this.freightspace = [{
                         binNumber: '',
                         maxStorage: '',

+ 16 - 15
src/views/warehouse/warehouseManagementEdit.vue

@@ -468,22 +468,23 @@
           .toPromise()
           .then((response) => {
             var tmp = []
-            tmp[0] = TextToCode[response.warehousePrivate].code
-            if(response.warehouseCity!=''){
-              tmp[1] =
-              TextToCode[response.warehousePrivate][response.warehouseCity].code
-              tmp[2] =
-              TextToCode[response.warehousePrivate][response.warehouseCity][
-                response.warehouseArea
-              ].code
-            }else{
-              tmp[1]=TextToCode[response.warehousePrivate]['市辖区'].code
-              tmp[2] =
-              TextToCode[response.warehousePrivate]['市辖区'][
-                response.warehouseArea
-              ].code
+            if(response.warehousePrivate&&response.warehousePrivate&&response.warehouseCity){
+              tmp[0] = TextToCode[response.warehousePrivate].code
+              if(response.warehouseCity!=''){
+                tmp[1] =
+                TextToCode[response.warehousePrivate][response.warehouseCity].code
+                tmp[2] =
+                TextToCode[response.warehousePrivate][response.warehouseCity][
+                  response.warehouseArea
+                ].code
+              }else{
+                tmp[1]=TextToCode[response.warehousePrivate]['市辖区'].code
+                tmp[2] =
+                TextToCode[response.warehousePrivate]['市辖区'][
+                  response.warehouseArea
+                ].code
+              }
             }
-           
             this.selectedOptions = tmp
             this.deptBudgetList = response
             // if(this.deptBudgetList.addressUrl){

+ 27 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -616,6 +616,14 @@
           @click="submit()"
           >提交</el-button
         >
+        <el-button
+          v-if="!allowEdit"
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="print()"
+          >提交并打印</el-button
+        >
       </div>
     </ws-form>
   </div>
@@ -712,6 +720,7 @@ export default {
         tare: '',
         inOutDate: '',
       },
+      weightbills:{},
       historyList: [],
 
       pickerBeginDateBefore: {
@@ -962,6 +971,9 @@ export default {
         }
       }
     },
+    print(){
+			this.submit(1)
+			},
     typeChange(e) {},
     contractNoChange(e) {
       for (let i = 0; i < this.deptBudgetList1.length; i++) {
@@ -978,6 +990,9 @@ export default {
         if (
           this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
         ) {
+          this.weightbills.buyer=this.outContractNo[i].buyer
+          this.weightbills.seller=localStorage.getItem('ws-pf_compName')
+          this.weightbills.goodsName=this.outContractNo[i].goodsName
           this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
           this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
           this.deptBudgetList.grade = this.outContractNo[i].grade
@@ -1426,7 +1441,7 @@ export default {
         })
     },
     //提交按钮
-    submit() {
+    submit(status) {
       if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空!',
@@ -1880,6 +1895,7 @@ export default {
               localStorage.getItem('ws-pf_staffName')
             this.deptBudgetList.inOutFlag = 1
             this.deptBudgetList.statusFlag = 3
+            
             addstorageputList(this.deptBudgetList)
               .toPromise()
               .then((response) => {
@@ -1887,6 +1903,16 @@ export default {
                   this.reader.cancel()
                 }
                 this.$message.success('添加成功')
+                if(status){
+                    this.weightbills.carNo=this.deptBudgetList.carNo
+                    this.weightbills.type=this.deptBudgetList.type
+                    this.weightbills.grossWeight=this.deptBudgetList.grossWeight
+                    this.weightbills.tare=this.deptBudgetList.tare
+                    this.weightbills.netWeight=this.deptBudgetList.netWeight
+                    var date=new Date()
+                    this.weightbills.updateDate=date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()+' '+date.getHours()+date.getMinutes()+date.getSeconds()
+                    window.open( '../../../../static/weightCheckOut.html?type=2&tableData=' +encodeURIComponent(JSON.stringify(this.weightbills)))
+                }
                 this.$router.push({
                   path: 'warehouseManagementList',
                 })