浏览代码

前端gjy

gjy 3 年之前
父节点
当前提交
ed0fdfae25

+ 1 - 1
.eslintrc.js

@@ -28,7 +28,7 @@ module.exports = {
     //空行最多不能超过100行
     'no-multiple-empty-lines': [0, { max: 50 }],
     'no-alert': 0, //禁止使用alert confirm prompt
-    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    // 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
   },
   parserOptions: {

+ 41 - 0
public/static/payprint.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+  </head>
+  <body>
+    <div id="app">
+      {{dataList}}
+       <el-button @click="visible = true">Button</el-button>
+    </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: {
+        dataList: ""
+      },
+      computed: {},
+      methods: {
+
+      },
+      mounted() {debugger
+       let _data = localStorage.getItem("pricePrintList")
+        // var _data = decodeURIComponent(this.getQueryVariable("id"))
+        console.log(_data)
+        this.dataList = JSON.parse(_data)
+        // window.print()
+        // window.onafterprint = function(event) {
+        //   window.history.back(-1)
+        // };
+      },
+      watch: {
+      }
+    })
+  </script>
+
+</html>

+ 41 - 0
public/static/print.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+  </head>
+  <body>
+    <div id="app">
+      {{dataList}}
+       <el-button @click="visible = true">Button</el-button>
+    </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: {
+        dataList: ""
+      },
+      computed: {},
+      methods: {
+
+      },
+      mounted() {debugger
+       let _data = localStorage.getItem("pricePrintList")
+        // var _data = decodeURIComponent(this.getQueryVariable("id"))
+        console.log(_data)
+        this.dataList = JSON.parse(_data)
+        // window.print()
+        // window.onafterprint = function(event) {
+        //   window.history.back(-1)
+        // };
+      },
+      watch: {
+      }
+    })
+  </script>
+
+</html>

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -42,4 +42,6 @@ export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
 //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
+//付款管理列表
+export const API_GET_PAYMENTMANAGEMENT = '/paymentManagement/selectPaymentManagement'
 

+ 4 - 3
src/model/houseSelfCollect/index.js

@@ -23,8 +23,8 @@ import {
   API_GET_INSPECT_GETINSPECTLOOKUNITPRICE,
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_POST_INSPECT_GETINSPECTEDIT,
-  API_POST_INSPECT_GETINSPECTDELETE
-
+  API_POST_INSPECT_GETINSPECTDELETE,
+  API_GET_PAYMENTMANAGEMENT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -71,4 +71,5 @@ export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
 //质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
-
+//付款管理列表
+export const getpayment = appRx.get(API_GET_PAYMENTMANAGEMENT, errorCatcher, errorHandle, filter)

+ 5 - 5
src/views/home/index.vue

@@ -8,10 +8,10 @@
         <Panel :data-list="panelList"
                @click="gotoNewRw"></Panel>
         <div v-show="true">
-          <el-button @click="test">test</el-button>
-          <el-button @click="test1">test1</el-button>
-          <el-button @click="openPort">openPort</el-button>
-          <el-button @click="closePort">closePort</el-button>
+          <el-button @click="test()">test</el-button>
+          <el-button @click="test1()">test1</el-button>
+          <el-button @click="openPort()">openPort</el-button>
+          <el-button @click="closePort()">closePort</el-button>
           <div>{{text}}</div>
         </div>
        <!-- <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt=""> -->
@@ -543,7 +543,7 @@ export default {
       console.log('testtesttesttest111111');
     },
     async openPort(){
-      console.log('openPort');
+      console.log('openPort',navigator);
       if ('serial' in navigator) {
         // The Web Serial API is supported.
         console.log('the Web Serial API is supported.');

+ 6 - 6
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -61,7 +61,8 @@
   import {
     getPurchasePrice,
     selectWarehouseSelf,
-    purchasePriceAllowEdit
+    purchasePriceAllowEdit,
+    purchasePriceLook
   } from '@/model/houseSelfCollect/index'
   import acquisitionManagementAdd from './acquisitionManagementAdd.vue'
   export default {
@@ -136,7 +137,7 @@
             break
           case "查看":
             _query = {
-              data: row,
+              data:JSON.stringify(row),
               type: type
             }
             break
@@ -160,8 +161,6 @@
           this.selectVal = this.warehouseList[0].id
           // this.tableData = response.records
           this.getList()
-
-
         })
       },
       //获取列表数据
@@ -193,8 +192,9 @@
         this.visible = true
         console.log(index, row);
       },
-      print() {
-        window.location.href="../../../static/print.html"
+      print(index,row) {debugger
+      // 打印价格对照表
+        window.location.href="../../../static/print.html?data="+JSON.stringify(row)
       }
     },
   }

+ 52 - 13
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -134,7 +134,8 @@
 </template>
 <script>
   import {
-    purchasePriceAdd
+    purchasePriceAdd,
+    purchasePriceLook
   } from '@/model/houseSelfCollect/index'
   export default {
 
@@ -234,23 +235,53 @@
         isEdit: true
       }
     },
-    created() {
-      debugger
-      this.baseInfoForm.warehouseId = this.$route.query.warehouseId
-      this.baseInfoForm.warehouseName = this.$route.query.warehouseName
-      this.baseInfoForm.compId = this.$route.query.compId
-      this.type = this.$route.query.type
-      console.log(this.baseInfoForm)
-      this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
-      this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
-      this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
+    activated() {
+debugger
       switch (this.$route.query.type) {
         case "新增":
+        let _goodsNameList = []
+        this.baseInfoForm.warehouseId = this.$route.query.warehouseId
+        this.baseInfoForm.warehouseName = this.$route.query.warehouseName
+        this.baseInfoForm.compId = this.$route.query.compId
+        this.type = this.$route.query.type
+        console.log(this.baseInfoForm)
+        _goodsNameList = this.$route.query.goodsNameList
+        this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
+        this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
+        this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
+          // 货名
+          packList({
+              constId: 'CON2'
+            })
+            .toPromise()
+            .then((response) => {
+              let _list = []
+              for (let i = 0; i < response.length; i++) {
+                let _isAll = true
+                for (let j = 0; j < _goodsNameList.length; j++) {
+                  if (response[i].constValue != _goodsNameList[j]) {
+                    if (j == _goodsNameList.length - 1 && _isAll) {
+                      _list.push(response[i])
+                    }
+                  } else {
+                    _isAll = false
+                  }
+                }
+              }
+              this.goodnameList = _list
+              this.selectVal = _list[0].constValue
+            })
           break;
         case "编辑":
           break;
         case "查看":
-
+         this.baseInfoForm =JSON.parse(this.$route.query.data)
+       purchasePriceLook({id:this.baseInfoForm.id}).toPromise().then((response) => {
+              debugger
+              console.log(response)
+              // this.tableData = response.records
+              // this.getList()
+            })
           break;
         default:
           break
@@ -453,7 +484,15 @@
           this.baseInfoForm.details.push(_detailsObj)
 
         }
-console.log(this.baseInfoForm)
+      },
+
+      //打印
+      print() {
+
+      },
+      // 提交
+      submit() {
+        this.isCountShow = false
         this.makeTableList()
         // purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
         //   console.log(response)

+ 38 - 19
src/views/houseSelfCollect/paymentManagement.vue

@@ -13,16 +13,16 @@
       </template>
       <template slot="right">
         <ws-select
-          v-model="searchTypeText"
+          v-model="warehouseName"
           placeholder=""
-          @change="selecttaskType"
+          @change="selectwarehouseName"
           :value="searchType"
         >
           <ws-option
-            v-for="item in taskTypeList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
+            v-for="item in warehouseList"
+            :key="item.warehouseName"
+            :label="item.warehouseName"
+            :value="item.warehouseName"
             style="color: #8890b1"
           />
         </ws-select>
@@ -51,9 +51,9 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="paymentList"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="paymentList"
       border
       height="780"
       @selection-change="handleSelectionChange"
@@ -93,23 +93,25 @@
       <el-table-column
         class="table_td"
         prop="tidalGrainPrice"
-        width='200'
+        width='180'
         label="净重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="solidGrainPrice"
-        width='200'
+        width='180'
         label="纯重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="netWeight"
+        width='140'
         label="净重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="pureWeight"
+        width='140'
         label="纯重(公斤)"
       ></el-table-column>
       <el-table-column
@@ -138,10 +140,12 @@
         label="操作"
         width="350"
       >
+      <template scope="scope">
         <el-button @click="del">删除</el-button>
         <el-button @click="settlement(1)">结算</el-button>
         <el-button @click="settlement(2)">查看</el-button>
-        <el-button>打印</el-button>
+        <el-button @click='print(scope.row)'>打印</el-button>
+      </template>
       </el-table-column>
     </el-table>
     <!-- 付款弹窗 -->
@@ -188,7 +192,7 @@
   </div>
 </template>
 <script>
-import {getpayment} from '@/model/houseSelfCollect/index'
+import {getpayment,selectWarehouseSelf} from '@/model/houseSelfCollect/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 
 export default {
@@ -204,16 +208,13 @@ export default {
       paymentList:[],
       deptCircularPage:{},
       deptBudgetTotal: 0,
-      warehouseList: [
-        {
-          collectionEdPayable: '快付款',
-        },
-      ],
       paymentForm: false,
       taskTypeList: ['一号库'],
       searchType: '',
       searchTypeText: '',
       searchKeyWord: '',
+      warehouseList:[],
+      warehouseName:'',
       value1: '', //付款日期
       modification: [],
     }
@@ -223,9 +224,21 @@ export default {
   },
   methods: {
    getList(){
-     getpayment({currentPage:this.currentPage,pageSize:this.pageSize}).toPromise().then((response) => {
+     getpayment({
+       currentPage:this.currentPage,
+       pageSize:this.pageSize,
+       searchKeyWord:this.searchKeyWord,
+       searchType:this.searchType,
+       warehouseName:this.warehouseName
+      }).toPromise().then((response) => {
           this.paymentList = response
         })
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      }).toPromise().then((response) => {
+          this.warehouseList = response
+        })
    },
     del() {
       this.$confirm(
@@ -297,6 +310,10 @@ export default {
           })
       }
     },
+    print(index,row) {debugger
+      // 打印价格对照表
+        window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
+      },
     examine() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要审核的条目')
@@ -350,7 +367,9 @@ export default {
     //     }
     //   }
     // },
-    selecttaskType() {},
+    selectwarehouseName(e) {
+      this.getList()
+    },
      handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val

+ 4 - 4
src/views/tranManagement/tranManagementUnShippingFeedbackLook.vue

@@ -138,10 +138,10 @@
               <span class="noservice" v-show="item.status == '未装车'">
                   未装船
                 </span>
-                <span class="service" v-show="item.status == '已装车'">
+                <span class="noservice" v-show="item.status == '已装车'">
                    未卸船
                 </span>
-                 <span class="serviced" v-show="item.status == '已送达'">
+                 <span class="service" v-show="item.status == '已送达'">
                    已卸船
                 </span>
             </div>
@@ -150,10 +150,10 @@
               <span class="noservice" v-show="item.status == '未装车'">
                   未装船
                 </span>
-                <span class="service" v-show="item.status == '已装车'">
+                <span class="noservice" v-show="item.status == '已装车'">
                    未卸船
                 </span>
-                 <span class="serviced" v-show="item.status == '已送达'">
+                 <span class="service" v-show="item.status == '已送达'">
                    已卸船
                 </span>
             </div>