gjy пре 3 година
родитељ
комит
ef6a98d068
29 измењених фајлова са 29129 додато и 865 уклоњено
  1. 2 1
      .env.production
  2. 19 5
      .env.test
  3. 27774 391
      package-lock.json
  4. 2 0
      package.json
  5. 20 0
      src/api/V2/houseSelfCollect/index.js
  6. 4 2
      src/lang/zh.js
  7. 31 3
      src/model/houseSelfCollect/index.js
  8. 68 16
      src/views/home/index.vue
  9. 25 50
      src/views/houseSelfCollect/acquisitionManagement.vue
  10. 1 1
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  11. 14 0
      src/views/houseSelfCollect/component/routers/route.js
  12. 29 14
      src/views/houseSelfCollect/customerManagement.vue
  13. 181 94
      src/views/houseSelfCollect/customerManagementAdd.vue
  14. 15 3
      src/views/houseSelfCollect/houseSelfCollectPrint.vue
  15. 217 52
      src/views/houseSelfCollect/inspectInfo.vue
  16. 114 58
      src/views/houseSelfCollect/inspectionManagement.vue
  17. 23 13
      src/views/houseSelfCollect/paymentManagement.vue
  18. 45 38
      src/views/houseSelfCollect/settlement.vue
  19. 272 0
      src/views/houseSelfCollect/weightCheck.vue
  20. 52 7
      src/views/tranManagement/tranManagementFireFeedback.vue
  21. 50 8
      src/views/tranManagement/tranManagementFireReceivingFeedback.vue
  22. 61 4
      src/views/tranManagement/tranManagementShippingArrangemen.vue
  23. 13 32
      src/views/tranManagement/tranManagementShippingFeedback.vue
  24. 2 2
      src/views/tranManagement/tranManagementShippingFeedbackLook.vue
  25. 7 3
      src/views/tranManagement/tranManagementShippingLook.vue
  26. 78 48
      src/views/tranManagement/tranManagementTransporTrainNo.vue
  27. 2 18
      src/views/tranManagement/tranManagementUnShippingFeedback.vue
  28. 2 2
      src/views/tranManagement/tranManagementUnShippingFeedbackLook.vue
  29. 6 0
      src/views/tranManagement/tranManagementVehicleDispatching.vue

+ 2 - 1
.env.production

@@ -4,7 +4,8 @@
 
 NODE_ENV = 'production'
 # base api
-VUE_APP_BASE_API = 'http://api.eliangeyun.com'
+#VUE_APP_BASE_API = 'http://api2.eliangeyun.com'
+VUE_APP_BASE_API = 'http://apitest.eliangeyun.com'
 
 # 微服务相关接口配置
 ## 任务消息

+ 19 - 5
.env.test

@@ -1,20 +1,34 @@
-NODE_ENV = production
+#
+# 生产环境 环境变量
+#
 
+NODE_ENV = 'production'
 # base api
-VUE_APP_BASE_API = 'https://product-dev.winsea.com/pb/'
-## 明宇测试环境
-#VUE_APP_BASE_API = 'http://standard-dev.winsea.com/pb'
+VUE_APP_BASE_API = 'http://apitest.eliangeyun.com'
 
 # 微服务相关接口配置
+## 任务消息
 VUE_APP_API_NOTICE= ''
+## 新闻
 VUE_APP_API_NEWS= 'news-se'
+## 证书
 VUE_APP_API_CERTIFICATE= 'certificate-se'
+## 云盘
 VUE_APP_API_CLOUDDISK= 'clouddisk-se'
+## 运营后台
 VUE_APP_API_OPERATION= 'operation-se'
+## 维修保养
 VUE_APP_API_MAINTAIN= 'maintain-se'
+## 备件/物料/采购
 VUE_APP_API_SUPPLY = 'purchase-se'
+## 服务商
 VUE_APP_API_SERVICER = 'servicer-se'
+## 船员
 VUE_APP_API_CREW = 'crew-se'
+## 财务
+VUE_APP_API_FINANCE = 'finance-se'
+
+## NEW 产品
 VUE_APP_API_ISM= 'ism-se'
+
 VUE_APP_API_HELP = 'help-se'
-VUE_APP_API_FINANCE = 'finance-se'

Разлика између датотеке није приказан због своје велике величине
+ 27774 - 391
package-lock.json


+ 2 - 0
package.json

@@ -64,6 +64,7 @@
     "register-service-worker": "^1.0.0",
     "sass-loader": "^7.1.0",
     "script-loader": "^0.7.2",
+    "serialport": "^9.2.1",
     "sortablejs": "^1.8.4",
     "tinymce": "4.9.2",
     "url-loader": "^4.1.0",
@@ -99,6 +100,7 @@
     "cz-conventional-changelog": "^2.1.0",
     "electron": "^12.0.5",
     "electron-builder": "^22.10.5",
+    "electron-rebuild": "^3.2.3",
     "jquery": "^3.6.0",
     "lint-staged": "^10.2.13",
     "mockjs": "^1.0.1-beta3",

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

@@ -22,4 +22,24 @@ export const API_POST_PURCHASEPRICE_DEL = '/purchasePrice/purchasePriceDel'
 export const API_POST_PURCHASEPRICE_ALLOWEDIT = '/purchasePrice/purchasePriceAllowEdit'
 //查询仓库列表
 export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
+//客户修改
+export const API_POST_CUSTOMER_EDIT = '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo'
+//质检添加
+export const API_POST_INSPECT_ADD = '/qualityInspectionManagement/api/addQualityInspection'
+//质检仓位下拉
+export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
+//客户下拉
+export const API_GET_INSPECT_GETCUSTOMER = '/identityAuthenticationInfo/identityAuthenticationInfoCustomer'
+//质检列表
+export const API_GET_INSPECT_GETINSPECTLIST = '/qualityInspectionManagement/selectQualityInspection'
+//质检查看
+export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/getQualityInspection'
+//质检查看潮粮单价
+export const API_GET_INSPECT_GETINSPECTLOOKUNITPRICE = '/purchasePrice/tidalGrainPrice'
+//质检货名下拉
+export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement/api/goodsName'
+//质检修改
+export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
+//质检删除
+export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
 

+ 4 - 2
src/lang/zh.js

@@ -998,7 +998,8 @@
     customerManagementEdit:'客户管理编辑',
     customerManagementAdd:'客户管理添加',
     settlement:'结算',
-    inspectInfo:'质检信息'
+    inspectInfo:'质检信息',
+    weightCheck:'检斤'
   },
   // 后台错误码
   message: {
@@ -7424,7 +7425,8 @@
     customerManagementEdit:'客户管理编辑',
     customerManagementAdd:'客户管理添加',
     settlement:'结算',
-    inspectInfo:'质检信息'
+    inspectInfo:'质检信息',
+    weightCheck:'检斤'
 
   }
 

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

@@ -13,7 +13,17 @@ import {
   API_POST_PURCHASEPRICE_EDIT,
   API_POST_PURCHASEPRICE_DEL,
   API_POST_PURCHASEPRICE_ALLOWEDIT,
-  API_GET_WAREHOUSESELF
+  API_GET_WAREHOUSESELF,
+  API_POST_CUSTOMER_EDIT,
+  API_POST_INSPECT_ADD,
+  API_GET_INSPECT_GETBINNUMBER,
+  API_GET_INSPECT_GETCUSTOMER,
+  API_GET_INSPECT_GETINSPECTLIST,
+  API_GET_INSPECT_GETINSPECTLOOK,
+  API_GET_INSPECT_GETINSPECTLOOKUNITPRICE,
+  API_GET_INSPECT_GETINSPECTLOOKGOODS,
+  API_POST_INSPECT_GETINSPECTEDIT,
+  API_POST_INSPECT_GETINSPECTDELETE
 
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
@@ -41,6 +51,24 @@ export const purchasePriceDel = appRx.post(API_POST_PURCHASEPRICE_DEL, errorCatc
 export const purchasePriceAllowEdit = appRx.post(API_POST_PURCHASEPRICE_ALLOWEDIT, errorCatcher, errorHandle, filter)
 //查看仓库
 export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
-
-
+//客户查看
+export const CustomerEdit = appRx.post(API_POST_CUSTOMER_EDIT, errorCatcher, errorHandle, filter)
+//质检添加
+export const inspectAdd = appRx.post(API_POST_INSPECT_ADD, errorCatcher, errorHandle, filter)
+//仓位下拉
+export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
+//客户下拉
+export const getcustomer = appRx.get(API_GET_INSPECT_GETCUSTOMER, errorCatcher, errorHandle, filter)
+//质检列表
+export const getinspectList = appRx.get(API_GET_INSPECT_GETINSPECTLIST, errorCatcher, errorHandle, filter)
+//质检查看
+export const getinspectLook = appRx.get(API_GET_INSPECT_GETINSPECTLOOK, errorCatcher, errorHandle, filter)
+//质检查看潮粮单价
+export const getinspectLookUnitPrice = appRx.get(API_GET_INSPECT_GETINSPECTLOOKUNITPRICE, errorCatcher, errorHandle, filter)
+//质检查看货名下拉
+export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS, errorCatcher, errorHandle, filter)
+//质检修改
+export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
+//质检删除
+export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
 

+ 68 - 16
src/views/home/index.vue

@@ -7,7 +7,14 @@
         <!-- 任务、消息、提醒、超期 -->
         <Panel :data-list="panelList"
                @click="gotoNewRw"></Panel>
-               <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt="">
+        <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>
+          <div>{{text}}</div>
+        </div>
+       <!-- <img style='width:100%;margin-top:10px;' src="../../../public/img/tmt.gif" alt=""> -->
       </div>
     </div>
     <div id="mapXY"></div>
@@ -29,6 +36,7 @@
 </template>
 
 <script>
+// import serialport from 'serialport' 
 // 统计图start
 import maintenance from './components/maintenance'
 import shipCertificate from './components/shipCertificate'
@@ -110,7 +118,9 @@ export default {
         news: 0
       },
       vesselBankFlag: sessionStorage.getItem('ws-pf_vesselBankFlag'),
-      shezhiVal: ''
+      shezhiVal: '',
+      text:"数据",
+      reader:null
     }
   },
   computed: {
@@ -174,11 +184,11 @@ export default {
   async created () {
     //获取快捷路口列表
     this.getRouteList()
-    this.checkUserInfoDialog()
+    // this.checkUserInfoDialog()
   },
   async mounted () {
     //获取新闻列表
-    this.getNewList()
+    // this.getNewList()
     noticeNumber().toPromise().then(res => {
       const { task = 0, remind = 0, overdue = 0, news = 0 } = res
       this.number.task = task
@@ -186,16 +196,16 @@ export default {
       this.number.overdue = overdue
       this.number.news = news
     })
-    if (this.vesselBankFlag !== 'V') {
-      EventBus.$emit('addShipScript', () => {
-        this.initShipMap()
-      })
-    }
-    setTimeout(() => {
-      this.showEchart = true
-    }, 900)
+    // if (this.vesselBankFlag !== 'V') {
+    //   EventBus.$emit('addShipScript', () => {
+    //     this.initShipMap()
+    //   })
+    // }
+    // setTimeout(() => {
+    //   this.showEchart = true
+    // }, 900)
 
-    this.showBlockList = []
+    // this.showBlockList = []
     // if (this.vesselBankFlag === 'V') {
     //   this.$refs.noticeList.style.width = 'calc(50% - 7px)'
     //   this.$refs.newsList.style.width = 'calc(50% - 7px)'
@@ -211,9 +221,9 @@ export default {
     // }
   },
   watch: {
-    getLanguage: function () {
-      this.getShipList()
-    }
+    // getLanguage: function () {
+    //   this.getShipList()
+    // }
   },
   methods: {
     ...mapActions('user', ['toSetShow', 'changeVesslBank']),
@@ -525,6 +535,48 @@ export default {
       } else {
         this.$router.push({ name: 'workNotification', query: { types: data } })
       }
+    },
+    test(){
+      console.log('testtesttesttest');
+    },
+    async test1(){
+      console.log('testtesttesttest111111');
+    },
+    async openPort(){
+      console.log('openPort');
+      if ('serial' in navigator) {
+        // The Web Serial API is supported.
+        console.log('the Web Serial API is supported.');
+        const port = await navigator.serial.requestPort();
+        await port.open({ baudRate: 9600 }); // set baud rate
+        this.reader = port.readable.getReader();
+        // 监听来自串行设备的数据
+        while (true) {
+          const { value, done } = await this.reader.read();
+          console.log(value,done);
+          if (done) {
+            // 允许稍后关闭串口。
+            this.reader.releaseLock();
+            break;
+          }
+          var result="";
+          if(value.length < 5){
+          }
+          for(var i=0;i<value.length;i++){
+            result += String.fromCharCode(value[i])
+          }
+          this.text = result
+          // value 是一个 Uint8Array
+        }
+         await port.close();
+      }
+      else{
+        console.log('the Web Serial API is not supported.',navigator);
+      }
+    },
+    async closePort(){
+      console.log('closePort');
+      this.reader.cancel()
     }
   }
 }

+ 25 - 50
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -84,46 +84,12 @@
         compId: '',
         accountName: '',
         tableData: [],
-        // tableData: [{
-        //   date: '2016-05-02',
-        //   name: '王小虎',
-        //   address: '上海市普陀区金沙江路 1518 弄'
-        // }, {
-        //   date: '2016-05-04',
-        //   name: '王小虎',
-        //   address: '上海市普陀区金沙江路 1517 弄'
-        // }, {
-        //   date: '2016-05-01',
-        //   name: '王小虎',
-        //   address: '上海市普陀区金沙江路 1519 弄'
-        // }, {
-        //   date: '2016-05-03',
-        //   name: '王小虎',
-        //   address: '上海市普陀区金沙江路 1516 弄'
-        // }],
-        warehouseList: [],
-        // warehouseList: [{
-        //   value: '选项1',
-        //   label: '黄金糕'
-        // }, {
-        //   value: '选项2',
-        //   label: '双皮奶'
-        // }, {
-        //   value: '选项3',
-        //   label: '蚵仔煎'
-        // }, {
-        //   value: '选项4',
-        //   label: '龙须面'
-        // }, {
-        //   value: '选项5',
-        //   label: '北京烤鸭'
-        // }],
-        selectVal: ''
+        selectVal: '',
+        goodsNameList:[],
+        warehouseList:[]
       }
     },
-    activated() {
-      this.getList()
-    },
+    activated() {},
     computed() {},
     created() {
       debugger
@@ -150,8 +116,8 @@
       },
       newAcquisition(index, row, type) {
         debugger
-          let _obj = {}
-          let _query = {}
+        let _obj = {}
+        let _query = {}
         switch (type) {
           case '新增':
             _obj = this.warehouseList.find((item) => {
@@ -159,19 +125,20 @@
             });
             console.log(_obj)
             _query = {
-            warehouseId: _obj.id,
-            warehouseName: _obj.warehouseName,
-            compId: this.compId,
-            type:type
-          }
+              warehouseId: _obj.id,
+              warehouseName: _obj.warehouseName,
+              compId: this.compId,
+              type: type,
+              goodsNameList:this.goodsNameList
+            }
             break
           case '编辑':
             break
           case "查看":
-          _query = {
-            data:row,
-            type:type
-          }
+            _query = {
+              data: row,
+              type: type
+            }
             break
           default:
             break
@@ -187,10 +154,13 @@
           compId: this.compId,
           personCharge: this.accountName,
         }).toPromise().then((response) => {
+          debugger
           console.log(response)
           this.warehouseList = response
           this.selectVal = this.warehouseList[0].id
           // this.tableData = response.records
+          this.getList()
+
 
         })
       },
@@ -203,6 +173,9 @@
           compId: this.compId,
         }).toPromise().then((response) => {
           console.log(response)
+          for(let i=0;i<response.records.length;i++){
+            this.goodsNameList.push(response.records[i].goodsName)
+          }
           this.tableData = response.records
         })
       },
@@ -220,7 +193,9 @@
         this.visible = true
         console.log(index, row);
       },
-      print() {}
+      print() {
+        window.location.href="../../../static/print.html"
+      }
     },
   }
 </script>

+ 1 - 1
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -454,7 +454,7 @@
 
         }
 console.log(this.baseInfoForm)
-        // this.makeTableList()
+        this.makeTableList()
         // purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
         //   console.log(response)
         //   // this.tableData = response.records

+ 14 - 0
src/views/houseSelfCollect/component/routers/route.js

@@ -170,6 +170,20 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
+    {
+      path: 'weightCheck',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weightCheck'),
+      name: 'weightCheck',
+      meta: {
+        title: 'weightCheck',
+        shortcutEntrance: 'weightCheck',
+        module: 'procurement.procurementOrder.delete',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
   ],
 
 };

+ 29 - 14
src/views/houseSelfCollect/customerManagement.vue

@@ -16,7 +16,7 @@
           :value="searchType"
         >
           <ws-option
-            v-for="item in taskTypeList"
+            v-for="item in warehouseList"
             :key="item.value"
             :label="item.value"
             :value="item.value"
@@ -82,7 +82,7 @@
     <el-table
       :data="customertList"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="customertList"
       border
       height="780"
     >
@@ -108,7 +108,7 @@
             height="16"
             style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png"
-            @click="createCustomer(scope.row,2)"
+            @click="createCustomer(scope.row, 2)"
             v-hasPermission="
               `contractManagement.buyContract.buyContractInfo.view`
             "
@@ -119,7 +119,7 @@
             height="16"
             style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/bianji.png"
-            @click="createCustomer(scope.row,3)"
+            @click="createCustomer(scope.row, 3)"
             v-hasPermission="
               `contractManagement.buyContract.buyContractInfo.edit`
             "
@@ -161,6 +161,7 @@
 import {
   getCustomerManage,
   getCustomerDelete,
+  selectWarehouseSelf,
 } from '@/model/houseSelfCollect/index'
 import QRCode from 'qrcodejs2'
 import customerManagementAdd from './customerManagementAdd.vue'
@@ -179,7 +180,7 @@ export default {
       pageSize: 10,
       deptBudgetTotal: 0,
       deptCircularPage: {},
-      taskTypeList: [], //选择仓库数组
+      warehouseList: [], //选择仓库数组
       searchTypeText: '', //仓库
       searchType: '',
     }
@@ -208,11 +209,11 @@ export default {
     //选择仓库改变事件
     selecttaskType() {},
     //创建客户
-    createCustomer(row,num) {
+    createCustomer(row, num) {
       let type = num
       this.$router.push({
         name: 'customerManagementAdd',
-        query: { types: type ,id:row.id},
+        query: { types: type, id: row.id },
       })
     },
     handleSizeChange(val) {
@@ -225,7 +226,7 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    
+
     handleEdit(row) {
       this.$router.push({
         name: 'customerManagementEdit',
@@ -243,12 +244,12 @@ export default {
         .then(() => {
           getCustomerDelete({
             compId: sessionStorage.getItem('ws-pf_compId'),
-            id:row.id
+            id: row.id,
           })
             .toPromise()
             .then((response) => {
-             this.$message.success('删除成功')
-             this.getList()
+              this.$message.success('删除成功')
+              this.getList()
             })
         })
         .catch(() => {
@@ -256,17 +257,31 @@ export default {
         })
     },
     getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList.push({
+              value: response[i].warehouseName,
+            })
+          }
+        })
+
       getCustomerManage({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
-        searchKeyWord: this.searchKeyWord
+        searchKeyWord: this.searchKeyWord,
+        searchTypeText:this.searchTypeText
       })
         .toPromise()
         .then((response) => {
-          console.log(response)
           this.customertList = response.records
-           this.deptBudgetTotal = response.total
+          this.deptBudgetTotal = response.total
         })
     },
   },

+ 181 - 94
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -17,16 +17,12 @@
         >
       </el-col>
     </el-row>
-    <!-- <div>
-
-    </div> -->
-    <!-- <div class="title">新增粮商</div> -->
     <div class="unload">
       <ws-form ref="customerList" :model="customerList" label-width="120px">
         <ws-info-table>
           <div style="display: flex; width: 100%; text-align: center">
-            <div v-if="switchType==1" style="width: 50%; margin: 0 auto">
-               上传身份证正面
+            <div v-if="switchType == 1" style="width: 50%; margin: 0 auto">
+              上传身份证正面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
@@ -40,14 +36,22 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
             </div>
-            <div style="width: 50%; margin: 0 auto" :class="identityUp" v-if="switchType==2||switchType==3">
+            <div
+              style="width: 50%; margin: 0 auto"
+              :class="identityUp"
+              v-if="switchType == 2 || switchType == 3"
+            >
               上传身份证正面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
                 list-type="picture-card"
                 :on-preview="handlePictureCardPreview"
-                :on-remove="(file) => {handleRemove(file,identityUp)}"
+                :on-remove="
+                  (file) => {
+                    handleRemove(file, 1)
+                  }
+                "
                 :auto-upload="true"
                 :on-success="upLoadSuccess1"
                 :disabled="disabled"
@@ -56,8 +60,8 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
             </div>
-            <div v-if="switchType==1" style="width: 50%; margin: 0 auto">
-               上传身份证反面
+            <div v-if="switchType == 1" style="width: 50%; margin: 0 auto">
+              上传身份证反面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
@@ -66,20 +70,27 @@
                 :on-remove="handleRemove"
                 :auto-upload="true"
                 :on-success="upLoadSuccess2"
-                :disabled = "disabled"
+                :disabled="disabled"
               >
                 <i class="el-icon-plus"></i>
               </el-upload>
-
             </div>
-            <div style="width: 50%; margin: 0 auto" v-if="switchType==2||switchType==3" class="low">
+            <div
+              style="width: 50%; margin: 0 auto"
+              v-if="switchType == 2 || switchType == 3"
+              :class="identityLow"
+            >
               上传身份证反面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
                 list-type="picture-card"
                 :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove"
+                :on-remove="
+                  (file) => {
+                    handleRemove(file, 2)
+                  }
+                "
                 :auto-upload="true"
                 :on-success="upLoadSuccess2"
                 :disabled="disabled"
@@ -109,8 +120,8 @@
             />
           </ws-form-item>
           <div style="display: flex; width: 100%; text-align: center">
-            <div style="width: 50%; margin: 0 auto" v-if="switchType==1" >
-               上传银行卡正面
+            <div style="width: 50%; margin: 0 auto" v-if="switchType == 1">
+              上传银行卡正面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
@@ -124,14 +135,22 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
             </div>
-            <div style="width: 50%; margin: 0 auto" v-if="switchType==2||switchType==3" class="bankUp">
+            <div
+              style="width: 50%; margin: 0 auto"
+              v-if="switchType == 2 || switchType == 3"
+              :class="bankUps"
+            >
               上传银行卡正面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
                 list-type="picture-card"
                 :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove1"
+                :on-remove="
+                  (file) => {
+                    handleRemove1(file, 1)
+                  }
+                "
                 :auto-upload="true"
                 :on-success="bankSuccess1"
                 :disabled="disabled"
@@ -140,7 +159,7 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
             </div>
-            <div style="width: 50%; margin: 0 auto" v-if="switchType==1">
+            <div style="width: 50%; margin: 0 auto" v-if="switchType == 1">
               上传银行卡反面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
@@ -155,14 +174,22 @@
                 <i class="el-icon-plus"></i>
               </el-upload>
             </div>
-            <div style="width: 50%; margin: 0 auto" v-if="switchType==2||switchType==3" class="bankLow">
+            <div
+              style="width: 50%; margin: 0 auto"
+              v-if="switchType == 2 || switchType == 3"
+              :class="bankLows"
+            >
               上传银行卡反面
               <el-upload
                 action="https://www.zthymaoyi.com/upload/admin"
                 :limit="1"
                 list-type="picture-card"
                 :on-preview="handlePictureCardPreview"
-                :on-remove="handleRemove1"
+                :on-remove="
+                  (file) => {
+                    handleRemove1(file, 2)
+                  }
+                "
                 :auto-upload="true"
                 :on-success="bankSuccess2"
                 :disabled="disabled"
@@ -260,8 +287,15 @@
           </ws-form-item>
         </ws-info-table>
         <div class="but">
-          <el-button type="primary" @click="commit" v-if="switchType==1 || switchType==3">提交</el-button>
-          <el-button type="primary" @click = "cancel" v-if="switchType==2">关闭</el-button>
+          <el-button
+            type="primary"
+            @click="commit"
+            v-if="switchType == 1 || switchType == 3"
+            >提交</el-button
+          >
+          <el-button type="primary" @click="cancel" v-if="switchType == 2"
+            >关闭</el-button
+          >
         </div>
       </ws-form>
     </div>
@@ -272,6 +306,7 @@ import {
   customerAdd,
   customerIdentity,
   getCustomerLook,
+  CustomerEdit,
 } from '@/model/houseSelfCollect/index'
 
 export default {
@@ -287,37 +322,40 @@ export default {
       identity: [],
       bank: [],
       trader: '新增',
-      switchType:"",
-      identityImgUp:[
+      switchType: '',
+      identityImgUp: [
         {
-          url:"",
-        }
+          url: '',
+        },
       ],
-      identityImgLow:[
+      identityImgLow: [
         {
-          url:"",
-        }
+          url: '',
+        },
       ],
-      bankImgUp:[
+      bankImgUp: [
         {
-          url:"",
-        }
+          url: '',
+        },
       ],
-      bankImgLow:[
+      bankImgLow: [
         {
-          url:""
-        }
+          url: '',
+        },
       ],
-      identityUp:"up",
+      identityUp: 'up',
+      identityLow: 'low',
+      bankUps: 'bankUp',
+      bankLows: 'bankLow',
     }
   },
   activated() {
-   this.switchType = this.$route.query.types
-    if(this.$route.query.types == null){
-       this.switchType = 1
-    } 
+    this.switchType = this.$route.query.types
+    if (this.$route.query.types == null) {
+      this.switchType = 1
+    }
     let id = this.$route.query.id
-    if ( this.switchType == 2) {
+    if (this.switchType == 2) {
       this.disabled = true
       this.trader = '查看'
       this.getList(id)
@@ -326,24 +364,52 @@ export default {
       this.trader = '编辑'
       this.getList(id)
     }
-    console.log( this.switchType)
+    console.log(this.switchType)
   },
   methods: {
-    handleRemove(file,a) {
-      console.log(file)
-      console.log(a)
-      for (let i = 0; i < this.identity.length; i++) {
-        if (file.response.url == this.identity[i]) {
-          this.identity.splice(i, 1, '')
+    handleRemove(file, index) {
+      if (index == 1) {
+        this.identityUp = ''
+      } else if (index == 2) {
+        this.identityLow = ''
+      }
+
+      if (this.switchType == 3) {
+        for (let i = 0; i < this.identity.length; i++) {
+          if (file.url == this.identity[i]) {
+            this.identity.splice(i, 1, '')
+          }
         }
+        console.log(this.identity)
+      } else if (this.switchType == 1) {
+        for (let i = 0; i < this.identity.length; i++) {
+          if (file.response.url == this.identity[i]) {
+            this.identity.splice(i, 1, '')
+          }
+        }
+        console.log(this.identity)
       }
     },
-    handleRemove1(file) {
-      for (let i = 0; i < this.bank.length; i++) {
-        if (file.response.url == this.bank[i]) {
-          this.bank.splice(i, 1, '')
+    handleRemove1(file, index) {
+      if (index == 1) {
+        this.bankUps = ''
+      } else if (index == 2) {
+        this.bankLows = ''
+      }
+      if (this.switchType == 3) {
+        for (let i = 0; i < this.bank.length; i++) {
+          if (file.url == this.bank[i]) {
+            this.bank.splice(i, 1, '')
+          }
+        }
+      } else if (this.switchType == 1) {
+        for (let i = 0; i < this.bank.length; i++) {
+          if (file.response.url == this.bank[i]) {
+            this.bank.splice(i, 1, '')
+          }
         }
       }
+
       console.log(this.bank)
     },
     handlePictureCardPreview(file) {
@@ -392,70 +458,91 @@ export default {
       this.$router.push({ path: 'customerManagement' })
     },
     upLoadSuccess1(e) {
+      this.identityUp = 'up'
       this.identity[0] = e.url
     },
     upLoadSuccess2(e) {
+      this.identityLow = 'low'
       this.identity[1] = e.url
     },
     bankSuccess1(e) {
+      this.bankUps = 'bankUp'
       this.bank[0] = e.url
     },
     bankSuccess2(e) {
+      this.bankLows = 'bankLow'
       this.bank[1] = e.url
     },
     commit() {
-      this.$confirm('确定提交客户信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.customerList.cardAddressUrl = this.identity.toString()
-          this.customerList.payeeAddressUrl = this.bank.toString()
-          this.customerList.customerTypeFlag = 1
-          this.customerList.customerType = '个人'
-          customerAdd(this.customerList)
-            .toPromise()
-            .then((response) => {
-              this.customerList.id = response
-              customerIdentity(this.customerList)
-                .toPromise()
-                .then((response) => {
-                  console.log(response.code)
-                  this.$message.success('添加成功')
-                  this.$router.push({ path: 'customerManagement' })
-                })
-
-              // this.$message.success('添加成功')
-              // this.$router.push({ path: 'customerManagement' })
-            })
+      this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
+      this.customerList.cardAddressUrl = this.identity.toString()
+      this.customerList.payeeAddressUrl = this.bank.toString()
+      this.customerList.customerTypeFlag = 1
+      this.customerList.customerType = '个人'
+      if (this.switchType == 1) {
+        this.$confirm('确定提交客户信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
-        .catch(() => {
-          return false
+          .then(() => {
+            // this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
+            // this.customerList.cardAddressUrl = this.identity.toString()
+            // this.customerList.payeeAddressUrl = this.bank.toString()
+            // this.customerList.customerTypeFlag = 1
+            // this.customerList.customerType = '个人'
+            customerAdd(this.customerList)
+              .toPromise()
+              .then((response) => {
+                this.customerList.id = response
+                customerIdentity(this.customerList)
+                  .toPromise()
+                  .then((response) => {
+                    console.log(response.code)
+                    this.$message.success('添加成功')
+                    this.$router.push({ path: 'customerManagement' })
+                  })
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      } else if (this.switchType == 3) {
+        this.$confirm('确定修改客户信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
+          .then(() => {
+            CustomerEdit(this.customerList)
+              .toPromise()
+              .then((response) => {
+                  this.$message.success('修改成功')
+                    this.$router.push({ path: 'customerManagement' })
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      }
     },
     getList(ids) {
-       getCustomerLook({id:ids})
+      getCustomerLook({ id: ids })
         .toPromise()
         .then((response) => {
           this.customerList = response
-          this.identity = this.customerList.cardAddressUrl.split(",")
+          this.identity = this.customerList.cardAddressUrl.split(',')
           this.identityImgUp[0].url = this.identity[0]
           this.identityImgLow[0].url = this.identity[1]
-          this.bank = this.customerList.payeeAddressUrl.split(",")
-             this.bankImgUp[0].url = this.bank[0] 
-             this.bankImgLow[0].url = this.bank[1]
-          
+          this.bank = this.customerList.payeeAddressUrl.split(',')
+          this.bankImgUp[0].url = this.bank[0]
+          this.bankImgLow[0].url = this.bank[1]
         })
     },
   },
 }
 </script>
 <style lang="scss" scoped>
-// /deep/.el-form-item {
-//   margin-bottom: 0;
-// }
 .center {
   background: #f6f7fc;
 }
@@ -522,16 +609,16 @@ export default {
   text-align: center;
   margin: 20px auto;
 }
-/deep/.up .el-upload--picture-card{
+/deep/.up .el-upload--picture-card {
   display: none;
 }
-/deep/.low .el-upload--picture-card{
+/deep/.low .el-upload--picture-card {
   display: none;
 }
-/deep/.bankUp .el-upload--picture-card{
+/deep/.bankUp .el-upload--picture-card {
   display: none;
 }
-/deep/.bankLow .el-upload--picture-card{
+/deep/.bankLow .el-upload--picture-card {
   display: none;
 }
 </style>

+ 15 - 3
src/views/houseSelfCollect/houseSelfCollectPrint.vue

@@ -1,8 +1,8 @@
 <!--打印-->
 <template>
   <div id="print" class="center">
-   <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
-   
+   <div class="title">{{name}}</div>
+    <div @click="print">打印</div>
   </div>
 </template>
 <script>
@@ -21,14 +21,26 @@ export default {
   data() {
     return {
       tableData:{},
+      name:""
  
     }
   },
   activated() {
 
+  },
+  created(){
+    
+  // this.$route.query.type
+this.name = this.$route.query.name
   },
   methods: {
-
+print(){
+        let newstr = document.getElementById('print').innerHTML
+      let oldstr = document.body.innerHTML
+      document.body.innerHTML = newstr
+      window.print()
+            document.body.innerHTML = oldstr
+}
   },
 }
 </script>

+ 217 - 52
src/views/houseSelfCollect/inspectInfo.vue

@@ -22,80 +22,83 @@
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <ws-info-table>
-            <ws-form-item label="编号" span="1" prop="waterContent">
+            <ws-form-item label="编号" span="1" prop="qualityNo">
               <ws-input
+                v-model="inspect.qualityNo"
                 placeholder="请输入编号"
                 maxlength="100"
                 disabled
                 size="small"
               />
             </ws-form-item>
-            <ws-form-item label="仓位号" span="1" prop="waterContent">
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
               <ws-select
-                v-model="warehouseList.a"
+                v-model="inspect.binNumber"
                 placeholder="请输入仓位号"
                 class="typeselect"
-                @change="selectpackingMethod"
                 :disabled="disabled"
               >
                 <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
+                  v-for="item in getbinNumberList"
+                  :key="item.value"
+                  :label="item.value"
+                  :value="item.value"
                 />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="客户" span="1" prop="waterContent">
+            <ws-form-item label="客户" span="1" prop="customerName">
               <ws-select
-                v-model="warehouseList.a"
-                placeholder="请输入货名"
+                v-model="inspect.customerName"
+                placeholder="请输入客户"
                 class="typeselect"
                 @change="selectpackingMethod"
                 :disabled="disabled"
               >
                 <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
+                  v-for="item in customerList"
+                  :key="item.valueKey"
+                  :label="item.value"
+                  :value="item.value"
                 />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="囤位号" span="1" prop="waterContent">
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
               <ws-input
-                placeholder="请输入客户"
+                v-model="inspect.storageTagNo"
+                placeholder="请输入囤位号"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="车牌号" span="1" prop="waterContent">
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
               <ws-input
-                placeholder="请输入客户"
+                v-model="inspect.carNumber"
+                placeholder="请输入车牌号"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="货名" span="1" prop="waterContent">
+            <ws-form-item label="货名" span="1" prop="goodsName">
               <ws-select
-                v-model="warehouseList.a"
-                placeholder="请输入货名"
+                v-model="inspect.goodsName"
+                placeholder=""
                 class="typeselect"
-                @change="selectpackingMethod"
                 :disabled="disabled"
+                @change="waterContentChange"
               >
                 <ws-option
                   v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
+                  :key="item.goodsNameKey"
+                  :label="item.goodsName"
+                  :value="item.goodsName"
                 />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="扣重比" span="1" prop="waterContent">
+            <ws-form-item label="扣重比" span="1" prop="buckleWeightRatio">
               <ws-input
+                v-model="inspect.buckleWeightRatio"
                 placeholder="请输入扣重比"
                 maxlength="100"
                 size="small"
@@ -106,16 +109,25 @@
 
           <div class="title">质检数据</div>
           <ws-info-table>
-            <ws-form-item label="等级" span="1" prop="waterContent">
-              <ws-input
-                placeholder="请输入编号"
-                maxlength="100"
-                size="small"
+            <ws-form-item label="等级" span="1" prop="grade">
+              <ws-select
+                v-model="inspect.grade"
+                placeholder="请输入等级"
+                class="typeselect"
+                @change="waterContentChange"
                 :disabled="disabled"
-              />
+              >
+                <ws-option
+                  v-for="item in gradeList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
             </ws-form-item>
-            <ws-form-item label="杂质(%)" span="1" prop="waterContent">
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
               <ws-input
+                v-model="inspect.impurity"
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 size="small"
@@ -124,47 +136,54 @@
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input
+                v-model="inspect.waterContent"
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
+                @change = "waterContentChange"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="霉变粒(%)" span="1" prop="waterContent">
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
               <ws-input
+                v-model="inspect.mildewGrain"
                 placeholder="请输入霉变粒占比"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="容重(克/升)" span="1" prop="waterContent">
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
               <ws-input
+                v-model="inspect.bulkDensity"
                 placeholder="请输入容重"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
               <ws-input
+                v-model="inspect.jiaorenli"
                 placeholder="请输入热损伤占比"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            <ws-form-item label="不完整粒(%)" span="1" prop="waterContent">
+            <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
               <ws-input
+                v-model="inspect.imperfectGrain"
                 placeholder="请输入不完整粒占比"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
-            
           </ws-info-table>
-          <div style="text-align:right;color:#323233;">潮粮单价(元/公斤):000000000</div>
+          <div style="text-align: right; color: #323233">
+            潮粮单价(元/公斤):{{ inspect.tidalGrainPrice ==null?"0": inspect.tidalGrainPrice}}
+          </div>
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary"
               >取消</el-button
@@ -183,7 +202,16 @@
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {
+  inspectAdd,
+  getbinNumber,
+  getcustomer,
+  getinspectLook,
+  getinspectLookUnitPrice,
+  getinspectLookGoods,
+  getinspectEdit
+} from '@/model/houseSelfCollect/index'
+import { packList } from '@/model/contarct/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 export default {
   components: {
@@ -192,14 +220,25 @@ export default {
   watch: {},
   data() {
     return {
-      warehouseList: {},
+      // warehouseList: {},
+      inspect: {},
       disabled: false,
       types: '',
       information: '添加',
+      goodnameList: [],
+      gradeList: [],
+      customerList: [],
+      getbinNumberList: [],
+      cangid: '', //仓库id
+      warehouseName:'',
+      // calculation:''
     }
   },
   activated() {
     this.types = this.$route.query.type
+    this.cangid = this.$route.query.cangid
+    this.warehouseName = this.$route.warehouseName
+    let id = this.$route.query.id
     if (this.types == 2) {
       this.disabled = true
       this.information = '查看'
@@ -207,32 +246,158 @@ export default {
       this.disabled = false
       this.information = '编辑'
     }
-    console.log(this.information)
+    this.calculation()
+    this.getList(id)
   },
   methods: {
+    getdate() {
+      var date = new Date()
+      var year = date.getFullYear() //获取完整的年份(4位)
+      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+      var datetime = date.getDate() //获取当前日(1-31)
+      if (mouth < 10) {
+        mouth = '0' + mouth
+      }
+      if (datetime < 10) {
+        datetime = '0' + datetime
+      }
+      return year + mouth + datetime
+    },
+    calculation() {
+      this.inspect.qualityNo = 'SGRK' + this.getdate()
+      // + this.verifyinit()
+    },
     print() {
-      this.$confirm('确定保存质检信息?', '提示', {
+      if(this.types == 1){
+         this.$confirm('确定保存质检信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {
-          // this.xx = true;
-          let newstr = document.getElementById('print').innerHTML
-          let oldstr = document.body.innerHTML
-          document.body.innerHTML = newstr
-          window.print()
-          document.body.innerHTML = oldstr
-          // window.location.reload()
-          this.$router.push({ path: 'paymentManagement' })
+          this.inspect.warehouseName = this.warehouseName
+          this.inspect.compId = sessionStorage.getItem('ws-pf_compId'),
+          inspectAdd(this.inspect)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('保存成功')
+              // this.xx = true;
+              let newstr = document.getElementById('print').innerHTML
+              let oldstr = document.body.innerHTML
+              document.body.innerHTML = newstr
+              window.print()
+              document.body.innerHTML = oldstr
+              // window.location.reload()
+              this.$router.push({ path: 'paymentManagement' })
+            })
         })
         .catch(() => {
           return false
         })
+
+      }else if(this.types == 3){
+         this.$confirm('确定保存质检信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          // return
+          getinspectEdit(this.inspect)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('修改成功')
+              // this.xx = true;
+              let newstr = document.getElementById('print').innerHTML
+              let oldstr = document.body.innerHTML
+              document.body.innerHTML = newstr
+              window.print()
+              document.body.innerHTML = oldstr
+              // window.location.reload()
+              this.$router.push({ path: 'paymentManagement' })
+            })
+        })
+        .catch(() => {
+          return false
+        })
+
+      }
+     
     },
     cancel() {
       this.$router.push({ path: 'inspectionManagement' })
     },
+    waterContentChange() {
+      //潮粮单价改变事件
+      getinspectLookUnitPrice({
+        warehouseId: this.cangid,
+        goodsName: this.inspect.goodsName,
+        waterContent: this.inspect.waterContent,
+        grade:this.inspect.grade
+      })
+        .toPromise()
+        .then((response) => {
+          this.inspect.tidalGrainPrice = response
+        })
+    },
+    //货名改变事件
+    selectpackingMethod(e) {
+      let customers = e.split("(").split(")")[0]
+      this.inspect.customerName = customers[0]
+      this.inspect.customerPhone = customers[1]
+     console.log()
+
+    },
+    getList(ids) {
+      // 货名
+      getinspectLookGoods({ warehouseId: this.cangid })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      //客户
+      getcustomer({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          // this.gradeList = response
+          this.customerList = []
+          let customer = response
+          for (let i = 0; i < response.length; i++) {
+            customer =
+              response[i].customerName + '(' + response[i].customerPhone + ')'
+            this.customerList.push({
+              valueKey: i,
+              value: customer,
+            })
+          }
+        })
+      // 仓位
+      getbinNumber({ id: this.cangid })
+        .toPromise()
+        .then((response) => {
+          this.getbinNumberList=[]
+          for (let i = 0; i < response.warehousePositionInfoList.length; i++) {
+            this.getbinNumberList.push({
+              value: response.warehousePositionInfoList[i].binNumber,
+            })
+          }
+          // this.getbinNumberList = response.warehousePositionInfoList
+        })
+      if (this.types == 2 || this.types == 3) {
+        //查看
+        getinspectLook({ id: ids })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response
+          })
+      }
+    },
   },
 }
 </script>

+ 114 - 58
src/views/houseSelfCollect/inspectionManagement.vue

@@ -7,13 +7,13 @@
       </template>
       <template slot="right">
         <ws-select
-          v-model="searchTypeText"
+          v-model="warehouseName"
           placeholder=""
           @change="selecttaskType"
           :value="searchType"
         >
           <ws-option
-            v-for="item in taskTypeList"
+            v-for="item in warehouseList"
             :key="item.value"
             :label="item.value"
             :value="item.value"
@@ -44,9 +44,9 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="inspect"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="inspect"
       border
       height="780"
     >
@@ -57,45 +57,49 @@
         </template>
       </el-table-column>
       <el-table-column
-        prop="contractNo"
+        prop="qualityNo"
         width="120"
         label="编号"
       ></el-table-column>
-      <el-table-column prop="contractNo" label="客户"></el-table-column>
-      <el-table-column prop="contractNo" label="车牌号"></el-table-column>
-      <el-table-column prop="contractNo" label="货名"></el-table-column>
-      <el-table-column prop="contractNo" label="水分(%)"></el-table-column>
+      <el-table-column prop="customerName" label="客户"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
       <el-table-column
-        prop="contractNo"
+        prop="tidalGrainPrice"
         label="净重单价(元/公斤)"
       ></el-table-column>
-      <el-table-column prop="contractNo" label="仓位号"></el-table-column>
-      <el-table-column prop="contractNo" label="囤位号"></el-table-column>
-      <el-table-column prop="contractNo" label="质检员"></el-table-column>
-      <el-table-column prop="contractNo" label="质检时间"></el-table-column>
-      <el-table-column prop="contractNo" label="状态"></el-table-column>
-      <el-table-column width="300" prop="contractNo1" label="操作">
-        <el-button @click="inspectInfo(2)">查看</el-button>
-        <el-button @click="inspectInfo(3)">编辑</el-button>
-        <el-button @click="del">删除</el-button>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
+      <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
+      <el-table-column prop="qualityDate" label="质检时间"></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column width="300" label="操作">
+        <template slot-scope="scope">
+          <el-button @click="inspectInfo(scope.row, 2)">查看</el-button>
+          <el-button @click="inspectInfo(scope.row, 3)">编辑</el-button>
+          <el-button @click="del(scope.row)">删除</el-button>
+        </template>
       </el-table-column>
     </el-table>
-    <div style="text-align:center">
-    <el-pagination
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="currentPage"
-      :page-size="deptCircularPage.pageSize"
-      layout="total, sizes, prev, pager, next, jumper"
-      :total="deptBudgetTotal"
-    >
-    </el-pagination>
+    <div style="text-align: center">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
     </div>
   </div>
 </template>
 <script>
-import{
-
+import {
+  selectWarehouseSelf,
+  getinspectList,
+  getinspectDelete,
 } from '@/model/houseSelfCollect/index'
 
 export default {
@@ -103,54 +107,64 @@ export default {
   watch: {},
   data() {
     return {
-       //分页
+      //分页
       currentPage: 1,
       pageSize: 10,
-      deptCircularPage:{},
+      deptCircularPage: {},
       deptBudgetTotal: 0,
 
       searchKeyWord: '',
       taskTypeList: [],
-      searchType: '',
-      searchTypeText: '',
-      warehouseList: [
-        {
-          contractNo: '快付款',
-        },
-      ],
+      searchType: 0,
+      warehouseName: '',
+      inspect: [],
+      warehouseList: [],
+      cangid: '', //仓库id
     }
   },
-  activated() {},
+  activated() {
+    this.getList()
+  },
   methods: {
-    inspectInfo(index) {
+    find(){
+     this.getList()
+    },
+    inspectInfo(row, index) {
       //添加,编辑,查看
-      this.$router.push({ path: 'inspectInfo', query: { type: index } })
+      console.log(row.id, 'id值')
+      this.$router.push({
+        path: 'inspectInfo',
+        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName},
+      })
+    },
+    selecttaskType(e) {
+      console.log(e)
     },
-    selecttaskType() {},
-    del() {
+    del(row) {
       //删除
       this.$confirm('确定删除质检信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
-        .then(() => {})
+        .then(() => {
+          getinspectDelete({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
         .catch(() => {
           return false
         })
     },
-    // commit() {
-    //   //保存
-    //   this.$confirm('确定保存质检信息?', '提示', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning',
-    //   })
-    //     .then(() => {})
-    //     .catch(() => {
-    //       return false
-    //     })
-    // },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -161,6 +175,48 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
+    getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList.push({
+              // valueKey: i,
+              value: response[i].warehouseName,
+              id: response[i].id,
+            })
+          }
+          this.warehouseName = response[0].warehouseName
+          this.cangid = response[0].id
+        })
+
+      getinspectList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchKeyWord: this.searchKeyWord,
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          // for (let i = 0; i < response.length; i++) {
+          //   this.warehouseList.push({
+          //     valueKey: i,
+          //     value: response[i].warehouseName,
+          //     id:response[i].id
+          //   })
+          // }
+          // this.searchTypeText = response[0].warehouseName
+          // this.id = response[0].id
+          // console.log(response)
+          this.inspect = response.records
+          this.deptBudgetTotal = response.total
+        })
+    },
   },
 }
 </script>

+ 23 - 13
src/views/houseSelfCollect/paymentManagement.vue

@@ -71,53 +71,55 @@
       </el-table-column>
       <el-table-column
         class="table_td"
-        prop="contractNo"
+        prop="paymentNo"
         width="120"
         label="编号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closePositionDate"
+        prop="customerName"
         label="客户"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closingQuantity"
+        prop="carNo"
         label="车牌号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="transactionPrice"
+        prop="goodsName"
         label="货名"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closeRate"
+        prop="tidalGrainPrice"
+        width='200'
         label="净重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="basisPrice"
+        prop="solidGrainPrice"
+        width='200'
         label="纯重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountIngPayable"
+        prop="netWeight"
         label="净重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountEdPayable"
+        prop="pureWeight"
         label="纯重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountNotPayable"
+        prop="amountIngPayable"
         label="应付款(元)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="paymentDate"
+        prop="amountEdPayable"
         label="已付款(元)"
       ></el-table-column>
       <el-table-column
@@ -127,7 +129,7 @@
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="collectionEdPayable"
+        prop="status"
         label="状态"
       ></el-table-column>
       <el-table-column
@@ -186,7 +188,7 @@
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {getpayment} from '@/model/houseSelfCollect/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 
 export default {
@@ -199,6 +201,7 @@ export default {
       //分页
       currentPage: 1,
       pageSize: 10,
+      paymentList:[],
       deptCircularPage:{},
       deptBudgetTotal: 0,
       warehouseList: [
@@ -215,8 +218,15 @@ export default {
       modification: [],
     }
   },
-  activated() {},
+  activated() {
+    this.getList()
+  },
   methods: {
+   getList(){
+     getpayment({currentPage:this.currentPage,pageSize:this.pageSize}).toPromise().then((response) => {
+          this.paymentList = response
+        })
+   },
     del() {
       this.$confirm(
         '对应的质检和检斤记录将一并删除,是否确定删除操作?',

+ 45 - 38
src/views/houseSelfCollect/settlement.vue

@@ -30,7 +30,7 @@
               <ws-input
                 placeholder="请输入编号"
                 maxlength="100"
-                disabled
+                :disabled='disabled'
                 size="small"
               />
             </ws-form-item>
@@ -39,7 +39,7 @@
                 placeholder="请输入仓位号"
                 maxlength="100"
                 size="small"
-              disabled
+              :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="waterContent">
@@ -48,7 +48,7 @@
                 placeholder="请输入货名"
                 class="typeselect"
                 @change="selectpackingMethod"
-               disabled
+               :disabled='disabled'
               >
                 <ws-option
                   v-for="item in goodnameList"
@@ -59,27 +59,27 @@
               </ws-select>
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled />
+              <ws-input placeholder="请输入客户" maxlength="100" size="small" :disabled='disabled' />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入客户" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入客户" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
           </ws-info-table>
 
           <div class="title">质检数据</div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="waterContent">
-              <ws-input placeholder="请输入编号" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入编号" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="杂质(%)" span="1" prop="waterContent">
               <ws-input
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 size="small"
-               disabled
+               :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
@@ -87,7 +87,7 @@
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="waterContent">
@@ -95,18 +95,18 @@
                 placeholder="请输入霉变粒占比"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="容重(克/升)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入容重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入容重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
               <ws-input
                 placeholder="请输入热损伤占比"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="不完整粒(%)" span="1" prop="waterContent">
@@ -114,7 +114,7 @@
                 placeholder="请输入不完整粒占比"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
           </ws-info-table>
@@ -126,7 +126,7 @@
                 placeholder="请输入潮粮水分"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="扣重比" span="1" prop="waterContent">
@@ -134,7 +134,7 @@
                 placeholder="请输入扣重比"
                 maxlength="100"
                 size="small"
-                :disabled = "disabled"
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="干粮水分(%)" span="1" prop="waterContent">
@@ -142,26 +142,26 @@
                 placeholder="请输入干粮水分"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="扣重" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入扣重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="掉水(%)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入掉水" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入掉水" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="基数" span="1" prop="waterContent">
-              <ws-input placeholder="请输入基数" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入基数" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="毛重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入毛重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入毛重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="纯重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入纯重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入纯重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="皮重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入皮重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入皮重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item
               label="净重单价(元/公斤)"
@@ -172,11 +172,11 @@
                 placeholder="请输入净重单价"
                 maxlength="100"
                 size="small"
-              disabled
+              :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="扣杂(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入扣杂" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item
               label="纯重单价(元/公斤)"
@@ -187,11 +187,11 @@
                 placeholder="请输入纯重单价"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled='disabled'
               />
             </ws-form-item>
             <ws-form-item label="净重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入净重" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入净重" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
           </ws-info-table>
 
@@ -203,7 +203,7 @@
               prop="waterContent"
               class="formItem"
             >
-              <ws-input placeholder="请输入粮款" maxlength="100" size="small" disabled/>
+              <ws-input placeholder="请输入粮款" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="称重补助" span="1" prop="waterContent">
               <ws-input
@@ -278,7 +278,7 @@
               <ws-input
                 placeholder="请输入计算应付"
                 maxlength="100"
-               disabled
+               :disabled='disabled'
                 size="small"
               />
             </ws-form-item>
@@ -294,7 +294,7 @@
               <ws-input
                 placeholder="请输入人民币大写"
                 maxlength="100"
-                disabled
+                :disabled='disabled'
                 size="small"
               />
             </ws-form-item>
@@ -327,15 +327,15 @@
         </div>
       </ws-form>
     </div>
-    <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint>
+    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
   </div>
 </template>
 <script>
 import {} from '@/model/houseSelfCollect/index'
-import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
+// import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 export default {
   components: {
-    houseSelfCollectPrint,
+    // houseSelfCollectPrint,
   },
   watch: {},
   data() {
@@ -360,13 +360,20 @@ export default {
   methods: {
     print() {
       // this.xx = true;
-      let newstr = document.getElementById('print').innerHTML
-      let oldstr = document.body.innerHTML
-      document.body.innerHTML = newstr
-      window.print()
-      document.body.innerHTML = oldstr
+      // let newstr = document.getElementById('print').innerHTML
+      // let oldstr = document.body.innerHTML
+      // document.body.innerHTML = newstr
+      // window.print()
+        this.$router.push({ path: 'houseSelfCollectPrint',
+            query:{
+          name:"123"
+        }
+        },
+    
+        )
+      // document.body.innerHTML = oldstr
       // window.location.reload()
-      this.$router.push({ path: 'paymentManagement' })
+      // this.$router.push({ path: 'paymentManagement' })
     },
     cancel() {
       this.$router.push({ path: 'paymentManagement' })

+ 272 - 0
src/views/houseSelfCollect/weightCheck.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">{{ information }}检斤信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="substance">
+      <ws-form>
+        <div style="width: 50%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="编号" span="1" prop="qualityNo">
+              <ws-input
+                v-model="inspect.qualityNo"
+                placeholder="请输入编号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <!-- <ws-select
+                v-model="inspect.binNumber"
+                placeholder="请输入仓位号"
+                class="typeselect"
+                @change="selectpackingMethod"
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in getbinNumberList"
+                  :key="item.value"
+                  :label="item.value"
+                  :value="item.value"
+                />
+              </ws-select> -->
+               <ws-input
+                v-model="inspect.binNumber"
+                placeholder="请输入仓位号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="客户" span="1" prop="customerName">
+              <!-- <ws-select
+                v-model="inspect.customerName"
+                placeholder="请输入客户"
+                class="typeselect"
+                @change="selectpackingMethod"
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in customerList"
+                  :key="item.valueKey"
+                  :label="item.value"
+                  :value="item.value"
+                />
+              </ws-select> -->
+               <ws-input
+                v-model="inspect.customerName"
+                placeholder="请输入客户"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+              <ws-input
+                v-model="inspect.storageTagNo"
+                placeholder="请输入囤位号"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <ws-input
+                v-model="inspect.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <!-- <ws-select
+                v-model="inspect.goodsName"
+                placeholder=""
+                class="typeselect"
+                :disabled="disabled"
+                @change="waterContentChange"
+              >
+                <ws-option
+                  v-for="item in goodnameList"
+                  :key="item.goodsNameKey"
+                  :label="item.goodsName"
+                  :value="item.goodsName"
+                />
+              </ws-select> -->
+
+              <ws-input
+                v-model="inspect.goodsName"
+                placeholder="请输入货名"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="毛重(公斤)" span="1" prop="buckleWeightRatio">
+              <ws-input
+                v-model="inspect.buckleWeightRatio"
+                placeholder="请输入毛重"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+             <ws-form-item label="皮重(公斤)" span="1" prop="buckleWeightRatio">
+              <ws-input
+                v-model="inspect.buckleWeightRatio"
+                placeholder="请输入皮重)"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+             <ws-form-item label="扣杂(公斤)" span="1" prop="buckleWeightRatio">
+              <ws-input
+                v-model="inspect.buckleWeightRatio"
+                placeholder="请输入扣杂"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="净重(公斤)" span="1" prop="buckleWeightRatio">
+              <ws-input
+                v-model="inspect.buckleWeightRatio"
+                placeholder="请输入净重"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+          </ws-info-table>
+           
+          
+          <div style="text-align: right; color: #323233">
+            潮粮单价(元/公斤):{{
+              inspect.tidalGrainPrice == null ? '0' : inspect.tidalGrainPrice
+            }}
+          </div>
+          <div class="but">
+            <el-button @click="cancel" v-if="this.types != 2" type="primary"
+              >取消</el-button
+            >
+            <el-button @click="print" v-if="this.types != 2" type="primary"
+              >保存并打印</el-button
+            >
+            <el-button @click="cancel" v-if="this.types == 2" type="primary"
+              >关闭</el-button
+            >
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+        inspect:{},
+        types:1,
+        information:"头部信息",
+    }
+  },
+  activated() {},
+  methods: {},
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  background: #f6f7fc;
+}
+.ws-info-table {
+  border: none;
+}
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 30%;
+  text-align: center;
+  background: #ffffff;
+  font-size: 14px;
+  color: #8890b1;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: none;
+}
+.title {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 10px;
+}
+.titleup {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 15px;
+  background: #8890b1;
+  margin-right: 5px;
+}
+
+.substance {
+  background: #ffffff;
+  width: 100%;
+  border-radius: 4px;
+  margin: 0 auto;
+  padding-top: 20px;
+}
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.titleup {
+  position: relative;
+}
+.titleup::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.but {
+  text-align: center;
+  margin: 20px auto;
+}
+</style> 

+ 52 - 7
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -191,6 +191,16 @@
             <!--装车日期-->
             <el-form-item label="装车日期:" span="1" prop="loadingDate">
               <ws-date-picker
+                 v-if="item.status == '已装车' || item.status == '已送达'"
+                :disabled="readonly"
+                v-model="item.loadingDate"
+                type="date"
+                style="width: 150px"
+                placeholder="请选择日期"
+                value-format="yyyy-MM-dd"
+              />
+              <ws-date-picker
+                v-else
                 v-model="item.loadingDate"
                 type="date"
                 style="width: 150px"
@@ -200,7 +210,11 @@
             </el-form-item>
 
             <!-- 提交 -->
-            <span class="servicein" v-show="item.status == '已装车' || item.status == '已送达'">已装车</span>
+            <span
+              class="servicein"
+              v-show="item.status == '已装车' || item.status == '已送达'"
+              >已装车</span
+            >
             <span
               style="text-align: right; padding: 10px"
               class="center"
@@ -263,16 +277,15 @@
         class="bg-bottom"
         type="primary"
         size="small"
-        @click="submit(deptBudgetList)"
+        @click="finished(deptBudgetList)"
         >完货</el-button
       >
     </div>
   </div>
 </template>
 <script>
-import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, packList, feedback, getbank } from '@/model/transport/index'
-import { getstaff } from '@/model/warehouse/index'
+import { regionData } from 'element-china-area-data'
+import { seeCat, feedback, state } from '@/model/transport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -419,6 +432,38 @@ export default {
     revert() {
       this.$router.push({ path: 'tranManagementTransporHairRespond' })
     },
+    //完货
+    finished() {
+      this.$confirm(`完货操作后,装车信息不可修改,是否确定完货?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              var tranProcessInfo = {}
+              tranProcessInfo.id = this.deptBudgetList.id
+              state(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('完货成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ''
+                  this.$router.push({
+                    path: 'tranManagementTransporHairRespond',
+                  })
+                })
+            } else {
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     submit() {
       for (var i = 0; i < this.freightspace.length; i++) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {
@@ -466,6 +511,7 @@ export default {
               this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
               this.tranCarInfoList.tranCarNo = this.deptBudgetList.tranCarNo
               this.tranCarInfoList.carNo = this.deptBudgetList.carNo
+              this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
               this.tranCarInfoList.loadNetWeight =
                 this.deptBudgetList.loadNetWeight
               this.tranCarInfoList.tranType = this.tranType
@@ -516,8 +562,7 @@ export default {
           this.deptBudgetList.driver = response.tranCarInfoList[0].driver
           this.deptBudgetList.driverPhone =
             response.tranCarInfoList[0].driverPhone
-          this.deptBudgetList.sendDateStart =
-            response.tranCarInfoList[0].sendDateStart
+          this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
           this.deptBudgetList.receiveDateEnd =
             response.tranCarInfoList[0].receiveDateEnd
           this.deptBudgetList.carModel = response.tranCarInfoList[0].carModel

+ 50 - 8
src/views/tranManagement/tranManagementFireReceivingFeedback.vue

@@ -141,7 +141,7 @@
             <!--卸车净重-->
             <ws-form-item label="卸车净重:" span="1" prop="unloadNetWeight">
               <ws-input
-                v-if="item.status == '已卸车' || item.status == '已送达'"
+                v-if="item.status == '未装车' || item.status == '已送达'"
                 :disabled="readonly"
                 v-model="item.unloadNetWeight"
                 placeholder="请输入卸车净重"
@@ -195,6 +195,16 @@
             <!--卸车日期-->
             <el-form-item label="卸车日期:" span="1" prop="unloadingDate">
               <ws-date-picker
+                v-if="item.status == '未装车' || item.status == '已送达'"
+                :disabled="readonly"
+                v-model="item.unloadingDate"
+                type="date"
+                style="width: 150px"
+                placeholder="请选择日期"
+                value-format="yyyy-MM-dd"
+              />
+             <ws-date-picker
+                v-else
                 v-model="item.unloadingDate"
                 type="date"
                 style="width: 150px"
@@ -273,16 +283,15 @@
         class="bg-bottom"
         type="primary"
         size="small"
-        @click="submit(deptBudgetList)"
+        @click="finished(deptBudgetList)"
         >完货</el-button
       >
     </div>
   </div>
 </template>
 <script>
-import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, packList, feedback, getbank } from '@/model/transport/index'
-import { getstaff } from '@/model/warehouse/index'
+import { regionData } from 'element-china-area-data'
+import { seeCat, feedback, stateRec } from '@/model/transport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -426,6 +435,38 @@ export default {
         this.freightspace.splice(index, 1)
       }
     },
+    //完货
+    finished() {
+      this.$confirm(`完货操作后,装车信息不可修改,是否确定完货?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              var tranProcessInfo = {}
+              tranProcessInfo.id = this.deptBudgetList.id
+              stateRec(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('完货成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ''
+                  this.$router.push({
+                    path: 'tranManagementReceivingFeedback',
+                  })
+                })
+            } else {
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     submit() {
       for (var i = 0; i < this.freightspace.length; i++) {
         if (this.freightspace[i].temporaryDriverFlag != 0) {
@@ -470,7 +511,9 @@ export default {
               // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList.driver = this.deptBudgetList.driver
-              this.tranCarInfoList.unloadingDate = this.deptBudgetList.unloadingDate
+              this.tranCarInfoList.unloadingDate =
+                this.deptBudgetList.unloadingDate
+              this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
               this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
               this.tranCarInfoList.tranCarNo = this.deptBudgetList.tranCarNo
               this.tranCarInfoList.carNo = this.deptBudgetList.carNo
@@ -527,8 +570,7 @@ export default {
           this.deptBudgetList.driver = response.tranCarInfoList[0].driver
           this.deptBudgetList.driverPhone =
             response.tranCarInfoList[0].driverPhone
-          this.deptBudgetList.sendDateStart =
-            response.tranCarInfoList[0].sendDateStart
+          this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
           this.deptBudgetList.receiveDateEnd =
             response.tranCarInfoList[0].receiveDateEnd
           this.deptBudgetList.carModel = response.tranCarInfoList[0].carModel

+ 61 - 4
src/views/tranManagement/tranManagementShippingArrangemen.vue

@@ -313,6 +313,18 @@
                 ></ws-input>
               </ws-form-item>
             </div>
+            <span
+              v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" 
+              width="22"
+              height="22"
+              class="del"
+              @click="del(index, item)"
+              src="../../../public/img/del.png"
+              alt=""
+              >×</span>
+          </div>
+          <div style="text-align: right; color: #8890b1; font-size: 16px; margin-right: -40%" v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'">
+            共{{ total }}/{{ deptBudgetList.weight }}         
           </div>
           <el-button
             class="add bg-bottom"
@@ -340,7 +352,7 @@
 </template>
 <script>
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { shippingLook, packList, dispatchCat } from '@/model/transport/index'
+import { shippingLook, packList, dispatchCat ,delhaulagestage} from '@/model/transport/index'
 import { getstaff } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -450,6 +462,17 @@ export default {
       }
       return maxStorage
     },
+    total: function () {
+      if (this.deptBudgetList.tranCarInfoList.length > 0) {
+        var maxStorage = 0
+        for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+          maxStorage += Number(
+            this.deptBudgetList.tranCarInfoList[i].positionWeight
+          )
+        }
+        return maxStorage
+      }
+    },
   },
   methods: {
     getList() {
@@ -498,6 +521,10 @@ export default {
         .then((response) => {
           this.deptBudgetList = response
           if (response.tranCarInfoList.length > 0) {
+            if(response.tranCarInfoList[0].shipType =='集装箱') {
+              this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
+
+            }
             // for (
             //   var i = 0;
             //   i < this.deptBudgetList.tranCarInfoList.length;
@@ -538,9 +565,26 @@ export default {
       this.freightspace = []
       this.$router.go(-1)
     },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
+    del(index, row) {
+      if(row.status == null){
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+               }
+      }else{
+        this.$confirm('船次信息删除后不可恢复,是否确定删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+          delhaulagestage({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('删除成功')
+              if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+               }
+            })
+        })
       }
     },
     add() {
@@ -1293,4 +1337,17 @@ export default {
 /deep/.el-form-item__content .el-select {
   width: 42%;
 }
+//减号
+.del {
+  position: absolute;
+  // right: -38px;
+  top: 0px;
+  cursor: pointer;
+  right: -1%;
+  display: inline-block;
+  font-size: 20px;
+  width: 20px;
+  height: 10px;
+  line-height: 0px;
+}
 </style>

+ 13 - 32
src/views/tranManagement/tranManagementShippingFeedback.vue

@@ -191,6 +191,11 @@
                 v-model="item.caseNo"
                 placeholder="请输入箱号"
               ></el-input>
+              <el-input
+                v-else
+                v-model="item.caseNo"
+                placeholder="请输入箱号"
+              ></el-input>
             </el-form-item>
             <!--封号-->
             <el-form-item
@@ -204,6 +209,11 @@
                 v-model="item.titleNo"
                 placeholder="请输入封号"
               ></el-input>
+              <el-input
+                v-else
+                v-model="item.titleNo"
+                placeholder="请输入封号"
+              ></el-input>
             </el-form-item>
             <!-- 仓位号 -->
             <ws-form-item
@@ -281,15 +291,6 @@
                 <div v-show=" item.signStatus == '已签合同'" class="signStatus1">
                   {{ item.signStatus }}
                 </div>
-            <span
-              width="22"
-              height="22"
-              class="del"
-              @click="del(index)"
-              src="../../../public/img/del.png"
-              alt=""
-              >×</span
-            >
           </ws-info-table>
         </div>
       </div>
@@ -376,6 +377,7 @@ export default {
     return {
       deptBudgetList: {
         totalStorage: 0,
+        sendDateStart:''
       },
       tranCarInfoList: {
         loadPoundImg: '',
@@ -504,19 +506,6 @@ export default {
     handleClose() {
       this.dialogViewSpareMoney = false
     },
-    // add() {
-    //   this.freightspace.push({
-    //     driver: '',
-    //     driverPhone: '',
-    //     carNo: '',
-    //     loadNetWeight: '',
-    //   })
-    // },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
-      }
-    },
     //下拉司机姓名改变事件
     selectdriver() {},
     handleChange(value) {
@@ -651,14 +640,7 @@ export default {
             if (valid) {
               // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
-              this.tranCarInfoList.driver = this.deptBudgetList.driver
-              this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
-              this.tranCarInfoList.sendDateStart = this.deptBudgetList.sendDateStart
-              this.tranCarInfoList.receiveDateEnd = this.deptBudgetList.receiveDateEnd
-              this.tranCarInfoList.shipName = this.deptBudgetList.shipName  
-              this.tranCarInfoList.shipNo = this.shipNo
-              this.tranCarInfoList.shipType = this.deptBudgetList.shipType
-              this.tranCarInfoList.boxNumber = this.deptBudgetList.boxNumber
+              this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
               // this.tranCarInfoList.boxNo = this.arr.toString()
               for (var i = 0; i < this.tranCarInfoList.length; i++) {
                 this.tranCarInfoList[i].id = this.freightspace[i].id
@@ -701,8 +683,7 @@ export default {
           this.deptBudgetList.driver = response.tranCarInfoList[0].driver
           this.deptBudgetList.driverPhone =
             response.tranCarInfoList[0].driverPhone
-          this.deptBudgetList.sendDateStart =
-            response.tranCarInfoList[0].sendDateStart
+          this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
           this.deptBudgetList.receiveDateEnd =
             response.tranCarInfoList[0].receiveDateEnd
           this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName

+ 2 - 2
src/views/tranManagement/tranManagementShippingFeedbackLook.vue

@@ -180,12 +180,12 @@
           <ws-form-item label="装船日期" span="1" prop="loadingDate">
             {{ item.loadingDate }}
           </ws-form-item>
-               <!-- <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'" class="signStatus">
+               <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'" class="signStatus">
                   {{ item.signStatus }}
                 </div>
                 <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'" class="signStatus1">
                   {{ item.signStatus }}
-                </div> -->
+                </div>
             <span
               v-show="item.temporaryDriverFlag != 0"
               width="22"

+ 7 - 3
src/views/tranManagement/tranManagementShippingLook.vue

@@ -180,9 +180,13 @@
           .toPromise()
           .then((response) => {
             this.deptBudgetList = response
-            this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
-            console.log(this.deptBudgetList.tranCarInfoList[0].driverPhone)
-            console.log(this.deptBudgetList.tranCarInfoList[1].driverPhone)
+            if(response.tranCarInfoList[0].shipType =='集装箱') {
+              this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
+
+            }else{
+               this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
+
+            }
           })
       },
       //返回按钮

+ 78 - 48
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -44,7 +44,8 @@
         <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
           {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
-          }}{{ deptBudgetList.sendArea }}{{ deptBudgetList.sendDetailedAddress }}
+          }}{{ deptBudgetList.sendArea
+          }}{{ deptBudgetList.sendDetailedAddress }}
         </ws-form-item>
         <!--发货人-->
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
@@ -62,7 +63,8 @@
         <!--收货地址-->
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
           {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
-          }}{{ deptBudgetList.receiveArea }}{{ deptBudgetList.receiveDetailedAddress }}
+          }}{{ deptBudgetList.receiveArea
+          }}{{ deptBudgetList.receiveDetailedAddress }}
         </ws-form-item>
         <!--收货人-->
         <ws-form-item label="收货人" span="1" prop="receiver">
@@ -153,19 +155,29 @@
               />
             </el-select>
           </ws-form-item>
-          <ws-form-item
-              :label="'车厢号' "
-              span="1"
-              prop="boxNo"
-            >
-              <ws-input
-                v-model="item.boxNo"
-                placeholder="请输入车厢号"
-                maxlength="20"
-                size="small"
-              />
-            </ws-form-item>
+          <ws-form-item :label="'车厢号'" span="1" prop="boxNo">
+            <ws-input
+              v-model="item.boxNo"
+              placeholder="请输入车厢号"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--   -->
         </ws-info-table>
+        <!-- class="del" -->
+        <span
+          v-if="
+            item.status == '未装车' || item.status == '' || item.status == null
+          "
+          width="22"
+          height="22"
+          class="del"
+          @click="del(index, item)"
+          src="../../../public/img/del.png"
+          alt=""
+          >×</span
+        >
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
         <img width="22" height="22" src="../../../public/img/add.png" alt="" />
@@ -174,11 +186,7 @@
     </ws-form>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button
-        class="bg-bottom"
-        type="primary"
-        size="small"
-        @click="submit()"
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
         >提交</el-button
       >
     </div>
@@ -186,7 +194,12 @@
 </template>
 <script>
 import { regionData } from 'element-china-area-data'
-import { seeCat, dispatchCat, packList } from '@/model/transport/index'
+import {
+  seeCat,
+  dispatchCat,
+  packList,
+  delhaulagestage,
+} from '@/model/transport/index'
 import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -296,18 +309,35 @@ export default {
     // },
     add() {
       this.deptBudgetList.tranCarInfoList.push({
-        driver:this.deptBudgetList.tranCarInfoList[0].driver,
-        driverPhone:this.deptBudgetList.tranCarInfoList[0].driverPhone,
-        sendDateStart:this.deptBudgetList.tranCarInfoList[0].sendDateStart,
-        receiveDateEnd:this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
-        carModel:this.deptBudgetList.tranCarInfoList[0].carModel,
+        driver: this.deptBudgetList.tranCarInfoList[0].driver,
+        driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
+        sendDateStart: this.deptBudgetList.tranCarInfoList[0].sendDateStart,
+        receiveDateEnd: this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
+        carModel: this.deptBudgetList.tranCarInfoList[0].carModel,
         boxNo: '',
-        tranType: '2'
+        tranType: '2',
       })
     },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
+    del(index, row) {
+      if (row.status == '未装车') {
+        this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+          delhaulagestage({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('删除成功')
+              if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                this.deptBudgetList.tranCarInfoList.splice(index, 1)
+              }
+            })
+        })
+      } else {
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+          this.deptBudgetList.tranCarInfoList.splice(index, 1)
+        }
       }
     },
     //下拉司机姓名改变事件
@@ -374,7 +404,7 @@ export default {
             type: 'warning',
           })
           return
-        } 
+        }
         if (!this.deptBudgetList.tranCarInfoList[i].boxNo) {
           this.$message({
             message: '车厢号不能为空',
@@ -420,7 +450,7 @@ export default {
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
-          if (response.tranCarInfoList.length == 0) 
+          if (response.tranCarInfoList.length == 0)
             this.deptBudgetList.tranCarInfoList = [
               {
                 driver: '',
@@ -429,7 +459,7 @@ export default {
                 receiveDateEnd: '',
                 carModel: '',
                 boxNo: '',
-                tranType :'2'
+                tranType: '2',
               },
             ]
         })
@@ -510,20 +540,6 @@ export default {
 .position {
   position: relative;
 }
-
-.del {
-  position: absolute;
-  // right: -38px;
-  top: 9px;
-  cursor: pointer;
-  right: 0;
-  display: inline-block;
-  font-size: 20px;
-  width: 16px;
-  height: 10px;
-  line-height: 0px;
-}
-
 .amap-page-container {
   width: 300px;
   height: 300px;
@@ -636,7 +652,14 @@ export default {
 .bg-bottom {
   margin: 15px 0px;
 }
-
+.el-input--small {
+  font-size: 13px;
+}
+.el-input {
+  position: relative;
+  display: inline-block;
+  width: 86%;
+}
 .center {
   width: 90%;
   margin: 0 auto;
@@ -709,6 +732,13 @@ export default {
     padding: 0 !important;
   }
 }
+//减号
+.del {
+  position: absolute;
+  cursor: pointer;
+  margin-left: 224px;
+  margin-top: -52px;
+}
 .winseaview-view {
   padding: 0 0 20px;
 }
@@ -821,7 +851,7 @@ export default {
   padding: 0 25px;
   background: #f6f7fc;
 }
-/deep/.liaison .ws-info-table .el-form-item .el-form-item__content{
+/deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
   padding: 0px;
 }
 </style>

+ 2 - 18
src/views/tranManagement/tranManagementUnShippingFeedback.vue

@@ -266,15 +266,6 @@
             <div v-show="item.signStatus == '已签合同'" class="signStatus1">
               {{ item.signStatus }}
             </div>
-            <span
-              width="22"
-              height="22"
-              class="del"
-              @click="del(index)"
-              src="../../../public/img/del.png"
-              alt=""
-              >×</span
-            >
           </ws-info-table>
         </div>
       </div>
@@ -509,11 +500,6 @@ export default {
         loadNetWeight: '',
       })
     },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
-      }
-    },
     //下拉司机姓名改变事件
     selectdriver() {},
     handleChange(value) {
@@ -616,8 +602,7 @@ export default {
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList.driver = this.deptBudgetList.driver
               this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
-              this.tranCarInfoList.sendDateStart =
-                this.deptBudgetList.sendDateStart
+              this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
               this.tranCarInfoList.receiveDateEnd =
                 this.deptBudgetList.receiveDateEnd
               this.tranCarInfoList.shipName = this.deptBudgetList.shipName
@@ -667,8 +652,7 @@ export default {
           this.deptBudgetList.driver = response.tranCarInfoList[0].driver
           this.deptBudgetList.driverPhone =
             response.tranCarInfoList[0].driverPhone
-          this.deptBudgetList.sendDateStart =
-            response.tranCarInfoList[0].sendDateStart
+          this.$set(this.deptBudgetList,'sendDateStart',response.tranCarInfoList[0].sendDateStart) 
           this.deptBudgetList.receiveDateEnd =
             response.tranCarInfoList[0].receiveDateEnd
           this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName

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

@@ -181,12 +181,12 @@
             <ws-form-item label="卸船日期" span="1" prop="unloadingDate">
                 {{ item.unloadingDate }}
             </ws-form-item>
-               <!-- <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'" class="signStatus">
+               <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '未签合同'" class="signStatus">
                   {{ item.signStatus }}
                 </div>
                 <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '已签合同'" class="signStatus1">
                   {{ item.signStatus }}
-                </div> -->
+                </div>
             <span
               v-show="item.temporaryDriverFlag != 0"
               width="22"

+ 6 - 0
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -488,6 +488,11 @@ export default {
       this.$router.go(-1)
     },
     del(index, row) {
+      if(row.status == null){
+        if (this.deptBudgetList.tranCarInfoList.length > 1) {
+                  this.deptBudgetList.tranCarInfoList.splice(index, 1)
+               }
+      }else{
       this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -502,6 +507,7 @@ export default {
                }
             })
         })
+      }
     },
     add() {
       if(!this.deptBudgetList.tranPrice){

Неке датотеке нису приказане због велике количине промена